Jump to content

Trigonometric functions


Recommended Posts

google tan(45)

tan(45) = 1.61977519

run a test in autoit you get exactly the same response.

you are probably asking the wrong question.

this is what you want...

$pi = 3.14159265358979323846264338327950288419716939937510
$Result = Tan(45 * $pi/180)
MsgBox (48, "Test2", $Result)

edited the code to include pi to 50 dec places, or else it returns 0.99999999

BINGO!!

1° = pi / 180 radians.

Note that Tan is "infinite" for ... -3PI/2, -PI/2, PI/2, 3PI/2, 5PI/2, ... and tends to return 1.63317787283838e+016 for such multiples of Pi-halves.

Edited by mdiesel
Link to comment
Share on other sites

why doesnt

tan(45)
=1
cause it does not take degrees

EDIT

tan(45 degrees) = 1

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

0 divided by 0

the answer is as of yet, undefined, it could be anything except infinity...infinitys a silly number.

Maths mood in the holidays? What am i doing??!!!!

no probs, ace : any volounteers for making it even easier by making a TanD function?? shouldn't be too hard, just use tan with a conversion at the beginning...

Link to comment
Share on other sites

so is there a beter way....

tan(_degree(45)) or something.??

If you want to work with degrees that is the way to go.

However working with radians is much better since degrees is a retarded unit. Really.

90°= π/2

180°= π/

360°= 2π

More here.

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

got it

#include<math.au3>
 $ss=tan(_Radian(3))*54
 ConsoleWrite($ss)

will give me 2.83

i have a distance(54mm), and angle(3 degrees) and needed to know the rise.?

Try this:

$c = 54 ;mm
$alpha = 3 ;degrees
$a = Sin($alpha / 180 * 3.1415926535897932384626) * $c
$b = Cos($alpha / 180 * 3.1415926535897932384626) * $c

$rise = $a / $b

MsgBox(0, "Math", $rise)

$a and $b are perpendicular to each other.

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...