ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

Author Avatar
United Kingdom
#1  

COS calculates in radians not degrees.

Cos20 in radians is 0.408082061813392

If you want to work in degrees I guess you need to convert degrees to radians before carrying out the calculation. 1 radian = 57.2957795 (180/pi) degrees.

Author Avatar
PRO
Synthiam
#2  

Take a look at one of the examples under EZ-Script Functions called "SketchPad" - I have code on how to create a circle using Sin and Cos, if that's what you are looking for.

Otherwise, look into EZ-Script Function Syntax folder at the project named "SIN COS"

Author Avatar
Canada
#3  

I realy appreciate your quick response.

Merci beaucoup

Author Avatar
PRO
Synthiam
#4  

There are ACos and ASin as well - the math functions that ARC supports are:

. Sin() . Cos() . Tan() . Sec() . Csc() . Cot() . ASin() . ACos() . ATan() . SinH() . CosH() . TanH() . Abs() . Sqrt() . Ciel() . Floor() . Exp() . Log10() . Log() . Max() . Min() . Round() . E() . Pi()

#5  

Holy mathematics Rich! Next time I cut the birthday cake I'll be sure to use these functions! I am somewhat familiar with DJ's listed math functions ......except Floor() ?

Author Avatar
Canada
#6  

I gess floor() and ciel() are reserved for AR Drone

Author Avatar
United Kingdom
#7  

Floor and Ceiling are math functions, not specifically for the drone.

This will probably explain it better than I can...

Or just run the following script I just knocked up...

Print("Floor: " + Floor($pi))
Print("Ceiling: " + Ciel($pi))
Author Avatar
Canada
#8  

Floor () takes the decimals off ex: 1.234 will end as 1

Ciel () will add lyke if it will consider 1.234 be 1.9 + .1 = 2

Am i right?