We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
COMPUTERS YAPSHEET
Function Description Return Type
Math.max(x,y) Returns the highest value among x and Same as the
y. parameters. Math.min(x,y) Returns the least value among x and y. Same as the parameters. Math.abs(x) Returns the absolute value (without Same as the symbol) of x parameters. Math.round(x) Returns the rounded off value of x Integer (always) Math.sqrt(x) Returns the square root of value of x Same as the parameters. Math.cbrt(x) Returns the cube root of value of x Same as the parameters. Math.pow(x,y) Returns the value of xy. Double (always) Math.ceil(x) Returns the value of the next integer Integer (always) value of x. (for example, 5.4 -> 6) Math.floor(x) Returns the value of the previous Integer (always) integer value of x. (for example, 6.6 -> 6) Math.random() Returns a random value between 0 Double (always) (inclusive) and 1 (exclusive).
Function Description Return Type
Math.PI Returns the value of PI correct to 5 Double (or) decimal places (3.14159) Float based on variable datatype. Math.E Returns Euler’s Mathematical Constant Double (or) (2.71828) Float based on variable datatype.