sinCos()
Purpose
Returns the sine and cosine of the supplied angle.
Description
This is the sine (SIN) and cosine (COS) functions combined. If you require both values it is more convenient than calling the two separately.
Syntax
result = sinCos( angle )
Arguments
angle An acute angle in a right-angled triangle.
result A vector containing the sine (result.x) and cosine (result.y) values for the specified angle.
Example
clear()
centre = { gWidth() / 2, gHeight() / 2 }
for angle = 0 to 360 loop
col = { random( 101 ) / 100, random( 101 ) / 100, random( 101 ) / 100, 1.0 }
result = sinCos( angle )
point = { 600 * result.y + centre.x, 300 * result.x + centre.y }
line( centre, point, col )
repeat
for i = 1 to 100 loop
update()
repeat
Associated Commands
acos(), asin(), atan(), atan2(), pi(), radians(), sin(), sinCos(), tan()