pawno calculates the cosinus of an angle different than my calculator?!
#1

pawno:
Код:
floatcos(136.0) = -0.596
and my calculator:
Код:
cos(136.0) = -0.719
why?

another example:
pawno:
Код:
floatcos(60.0) = -0.88
calculator:
Код:
cos(60.0) = 0.5
...
Reply
#2

Because pawn uses radians as default.

floatcos is defined as follows:

Код:
floatcos Return the cosine of an angle

Syntax: Float: floatcos(Float: value, anglemode: mode=radian)

value: The value to calculate the cosine of.
mode: Specifies whether the angle (in parameter value) is specified in degrees (sexagesimal system), grades (centesimal system) or radian. The default is radian.

Returns: The result: the cosine of the input number.
Reply
#3

Quote:
Originally Posted by MaXx001
Because pawn uses radians as default.

floatcos is defined as follows:

Код:
floatcos Return the cosine of an angle

Syntax: Float: floatcos(Float: value, anglemode: mode=radian)

value: The value to calculate the cosine of.
mode: Specifies whether the angle (in parameter value) is specified in degrees (sexagesimal system), grades (centesimal system) or radian. The default is radian.

Returns: The result: the cosine of the input number.
ok thanks, it works now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)