Mar 11, 2010 01:37 GMT
Search Sorosy Dot Com
NBC Math Functions
     Fully featured NBC debugger for LEGO Mindstorms NXT 5 New NBC Math Functions NXT Spider Robot NXT Disk Plotter NXT Halloween Claw NXT Arcade Games
Main Page
Members Pages
Lego Mindstorms Projects
Windows, Windows CE, Pocket PC Applications
3D VRML Home Project
Pictures
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:
          #define SIN(X,R)

        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:
          #define COS(X,R)

        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:
          #define ASIN(X,R)

        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:
          #define ACOS(X,R)

        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:
          #define SQRT(X,R)

        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"

  • Download NBC Math Functions [MATH.NBC]
    (7 KB)

     
    These pages are best in 1024x768 or higher resolution with
    Copyright 2000-2008 (C) sorosy dot com