The sin()
NWScript command returns the sine of a float. That is, this command returns the y
-coordinate (in the Cartesian plane) of the endpoint of the line segment, originating at (0,0)
, of length 1 that forms an angle with the positive x
-axis of size equal to the provided value, measured in degrees. (Thus, the returned value will never be greater than 1 nor less than -1.) For positive angles less than 90 degrees, this is equivalent to taking the ratio of the lengths of two sides of a right triangle with an angle of the indicated measure — specifically, the length of the leg opposite to the angle divided by the length of the hypotenuse.
Definition[]
float sin (float fValue
)
float fValue
- The angle (measured in degrees) to take the sine of.
See also[]
asin()
— arcsine command