Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeConfluence
langjavascript
 
     n = math:log(2);

square root

...

Code Block
themeConfluence
langjavascript
n = math:sqrt(2);

power

power(<num1>,<num1>) - <num1> to the <num2>th power.

Code Block
themeConfluence
languagejavascript
 n = math:power(2,3);    //  n = 8

ceiling

ceiling(<num>) - the smallest integer not less than <num>

Code Block
themeConfluence
languagejavascript
n = math:sqrt(2);
ceiling(2.78);    // n = 3

floor

floor(<num>) - the largest integer not greater than <num>

Code Block
themeConfluence
languagejavascript
n = math:floor(2.78);    // n = 2

round

round(<num> - convert <num> to the nearest integer.

Code Block
themeConfluence
languagejavascript
n = math:round(2.1);    // n = 2
m = math:round(2.7);    // n = 3

 

Plane Angle Conversions

deg2rad

...

Code Block
themeConfluence
langjavascript
// using the same co-ordinates as the great distance example
// find waypoint 3/4ths of the distance along the great circle
b = math:great_circle_waypoint(rlnga,r90 - rlata, rlngb,r90 - rlatb,.75);
lng = b[0];
lat = b[1];