Math Object
A Built-IN Object That Has Properties and methods for Mathematical Constants and functions. For Example, The Math Object's Pi Property Has The Value of Pi.
grammar
To Use a Math Object:
Math.propertyName
2. Math.MethodName (Parameters)
PropertyName Is One of the Properties Listed Below.
Methodname is one of the methods listed below.
Property of
None. Description The Math object is a built-in JavaScript object. You reference the constant PI as Math.PI. Constants are defined with the full precision of real numbers in JavaScript. Similarly, you reference Math functions as methods. For example, the sine function is Math.sin (argument), where argument is the argument. It is often convenient to use the with statement when a section of code uses several Math constants and methods, so you do not have to type "Math" repeatedly. For example, with (math) {
a = pi * r * r
Y = r * sin (Theta)
X = r * cos (Theta)
}
Properties E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2 Methods abs acos asin atan ceil cos exp floor log max min pow random round sin sqrt tan Event handlers None. Objects do not have event handlers Built-in. Examples See the examples for the individual properties and Methods.
max method Returns the greater of two numbers. Syntax Math.max (number1, number2) number1 and number2 are any numeric arguments or the properties of existing objects. Method of Math Examples // Displays the value 20
Document.write ("THE MAXIMUM VALUE IS" Math.max (10, 20))
// displays the value -10
Document.write ("
the maximum value is" math.max (-10, -20)))
Min Method
method property A string specifying how form field input information is sent to the server. Syntax formName.method formName is either the name of a form or an element in the forms array. Property of form Description The method property is a reflection of the METHOD attribute of the