|
|
|
|
MATH.NBC is a file you can #include in your programs.
It provides mathematical functions that are not supported by NBC or the NXT default firmware.
History:
October 2, 2006: math.nbc downloadable
|
Change history
|
|
First release
First release
|
Features
|
5 New Mathematical Funtions:
- SIN
X (input) is any integer in degrees; R (output) is 100* the sine value (-100->100)
Prototype:
Usage:
set x, 10
SIN(x, y) // y is the sine of x
- COS
X (input) is any integer in degrees; R (output) is 100* the cosine value (-100->100)
Prototype:
Usage:
set x, 10
COS(x, y) // y is the cosine of x
- ASIN
X (input) is 100* the sin value (-100->100); R (output) is -90->90; R is 101 if X is outside -100->100 range
Prototype:
Usage:
set y, 50
ASIN(y, x) // x is the invert sine of y
- ACOS
X (input) is 100* the cos value (-100->100); R (output) is -90->90; R is 101 if X is outside -100->100 range
Prototype:
Usage:
set y, 50
ACOS(y, x) // x is the invert cosine of y
- SQRT
X (input) is any integer; R (output) is the sqrt value (0->max); if X<0, R is the sqrt value of absolute X
Prototype:
Usage:
set x, 25
SQRT(x, y) // y (5)is the square root of x (25)
|
Download and Installation
|
Download math.nbc and copy it in your project directory, or any common NBC directory
Start your NBC file with #include "math.nbc"
|
|
|
|