1, Math.ceil (x)
Returns the upward rounding of X.
var a=math.ceil (9.1); var b=math.ceil ( -9.1) Console.log (a); // TenConsole.log (b); //
2, Math.floor (x)
Returns the downward rounding of X.
var a=math.floor (9.1); var b=math.floor ( -9.1) Console.log (a); // 9Console.log (b); // -10
3, Math.Round (x)
Returns the integer after which x is rounded.
var a=math.round (4.5); Console.log (a); // 5
4, Math.Abs (x)
Returns the absolute value of x.
var a=math.abs ( -2); Console.log (a) //2
5, Math.max ()
Returns the maximum value in multiple numeric values.
var a=math.max (5,7,8,3,1,-10,100); Console.log (a); // -
6, Math.min
Returns the minimum value in multiple numeric values.
var a=math.min (5,7,8,3,1,-10,100); Console.log (a); // -10
7, Math.pow (x, y)
Returns the Y power of X
var a=math.pow (3,2); Console.log (a); // 9
8, Math.random ()
Returns a random number between 0 and 1.
var a=math.random (); Console.log (a); // 0.27254510880447924
Common Methods for math objects