Math
From ROBOTC API Guide
|
Main >> NXT >> Functions and Variables >> Math |
| ROBOTC has a powerful collection of useful math functions for the NXT, TETRIX, and VEX CORTEX platforms. The RCX and VEX PIC platforms do not have enough memory to store these more advanced math functions. |
Contents |
abs
| float abs(const float input) | |||||
| Returns the absolute value of a number.
|
acos
| float acos(const float Cosine) | |||||
| Returns the arc-cosine of a number in radians.
|
asin
| float asin(const float Sine) | |||||
| Returns the arc-sine of a number in radians.
|
atan
| float atan(const float Tangent) | |||||
| Returns the arc-tangent of a number in radians.
|
ceil
| float ceil(const float input) | |||||
| Returns the smallest integer value that is greater than or equal to input.
|
cos
| float cos(const float fRadians) | |||||
| Returns the cosine of a number of radians.
|
cosDegrees
| float cosDegrees(const float fDegrees) | |||||
| Returns the cosine of a number of degrees.
|
degreesToRadians
| float degreesToRadians(const float fDegrees) | |||||
| Returns the radian equivalent of fDegrees.
|
exp
| float exp(const float input) | |||||
| Returns the number 'e' rasied to the power of input.
|
floor
| float floor(const float input) | |||||
| Returns the largest integer value that is less than or equal to input.
|
log
| float log(const float input) | |||||
| Returns the natural logarithm (ln) of input.
|
log10
| float log10(const float input) | |||||
| Returns the base-10 logarithm of input.
|
PI
| const float PI = 3.14159265358979323846264338327950288419716939937510 | |
| The constant &pi.
|
pow
| float pow(const float base, const float exponent) | |||||||
| Returns base to the power of exponent.
|
radiansToDegrees
| short radiansToDegrees(const float fRadians) | |||||
| Returns the degree equivalent of fRadians.
|
sgn
| short sgn(const float input) | |||||
| Returns a value less than 0 if input is negative, and a value greater than 0 if input is positive.
|
sin
| float sin(const float fRadians) | |||||
| Returns the sine of a number of radians.
|
sinDegrees
| float sinDegrees(const float fDegrees) | |||||
| Returns the sine of a number of degrees.
|
sqrt
| float sqrt(const float input) | |||||
| Returns the square-root of input.
|