V1[]
Indications are, RAD
in SmileBasic V1 is identical to that in V2.
V2[]
RAD(number)
is a function which takes one number representing an angle measured in degrees, rounds it down to the nearest integer, then returns that angle converted to radians.
number
must be greater than or equal to 0
, and must be less than 361
. If the parameter is outside of this range, the system generates an Out of range (RAD)
error.
Some interesting results: RAD(180)-PI()
gives 0 (precisely), and RAD(360)-PI()*2
gives 1/4096 (precisely).
This function is conceptually the inverse of the DEG
function. Apart from rounding issues preventing this from being actually the case, DEG
may produce negative results, and results greater than 361, which cannot then be used as a parameter to RAD
.
V3[]
Indications are, RAD
in SmileBasic V3 is identical to that in V2.