Skip to content
forked from albin/mathapi

Math API - code by students/classmates back in 2016

Notifications You must be signed in to change notification settings

aleksson/mathapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mathapi

Code conventions

Code conventions

camelCase for identifier names (variables and functions). format for brackets is (){}
For more info see comenteded section in server.js file
camelCase for identifier names (variables and functions).
format for brackets is (){}
For more info see comenteded section in server.js file
We are using port 3000 on the server. Dont forget it when you doing your tests.

/hig/x/y

Max, Find the highest value of x and y - Alex W

/hig/1.0/20  

/low/x/y

Min, Find the lowest value of x and y - Marcus W

/low/1.0/100  

/rou/20.5

Round, Returns the value 21 - Nadim

/rou/x  

/flo/45.9

Floor, Rounds down to lowest integer - Anders
Note: Max 15 digits as input

/flo/x  

/tan/1

Ten, returns a numeric value that represents the tangent of the angle - Jason

/tan/x  

/pow/4/3

Pow, Return the value of the number 4 to be the power of 3 (444): - Jarl

/pow/3.4/4.5

/log/1

Log, returns the natural logarithm (base e) of a number - Faj

/log/x  

/sin/1

Sin, returns the sine of a number - Sebastian

/sin/x  

/cbr/1

Cbrt, returns the cube root of a number - Tobias J

/cbr/x  

/sqr1/

Sqrt1_2, represents the square root of 1/2 which is approximately 0.707 - James L

/sqr1/x  

/sqr/1

Sqrt, returns the square root of a number - Andreas R

/sqr/x  

/fro/1

Fround, returns the nearest single precision float representation of a number - free

/fro/x  

/cei/0.95

Ceil, returns the smallest integer greater than or equal to a given number - Mayra

/cei/x  

/cos/1

Cos, returns the cosine of a number - Andreas L

/cos/x  

/tru/13.37

Trunc, returns the integral part of a number by removing any fractional digits - Rose

/tru/x  

/acos/x

Acos, returns a numeric value between 0 and π radians for x between -1 and 1.

Math.acos(x)

/pyth/:a/:b/:c -

Pythagora's Theorem - Given a right triangle where c is the length of the hypotenus, a and b are the two other sides, this equation can be formed: a^2+b^2=c^2 -

/pyth/a/b/c

Enter two of the three sides to get the length of the third side.
Example:

/pyth/a/4/5
/pyth/3/b/5
/pyth/3/4/c

radie = √ ( area / π )

returnera radie från en area - Patricio V.

/radie/:area

/volume/shape/1/2/3 - Olle

Calculate the volume for the geometric figures: cylinder, box, sphere and cone and then the metrics for the figure: cylinder: cyl/radius/height box: box/height/length/width sphere: sphere/radius/ cone: cone/radius/height

/eucl/p/q

Euclidean distance - The Euclidean distance between points p and q is the length of the line segment connecting them

/eucl/0.0/10.10

/manh/x/y

Manhattan distance - The distance between two points measured along axes at right angles -- free

/manh/0.0/10.10

/circumference/radien

Calculate the curcumfence of the circle - Martin

/circumference/4

About

Math API - code by students/classmates back in 2016

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%