Så er det jo rart at have manualen ved hånden:
Math
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.
Core object
Implemented in JavaScript 1.0, NES 2.0
ECMA version ECMA-262
Created by
The Math object is a top-level, predefined JavaScript object. You can automatically access it without using a constructor or calling a method.
Description
All properties and methods of Math are static. You refer to the constant PI as Math.PI and you call the sine function as Math.sin(x), where x is the method\'s argument. Constants are defined with the full precision of real numbers in JavaScript.
----------------------------
i math objektet ligger der en hulens masse matematiske funktioner:
abs Returns the absolute value of a number.
acos Returns the arccosine (in radians) of a number.
asin Returns the arcsine (in radians) of a number.
atan Returns the arctangent (in radians) of a number.
atan2 Returns the arctangent of the quotient of its arguments.
ceil Returns the smallest integer greater than or equal to a number.
cos Returns the cosine of a number.
exp Returns Enumber, where number is the argument, and E is Euler\'s
constant, the base of the natural logarithms.
floor Returns the largest integer less than or equal to a number.
log Returns the natural logarithm (base E) of a number.
max Returns the greater of two numbers.
min Returns the lesser of two numbers.
pow Returns base to the exponent power, that is, baseexponent.
random Returns a pseudo-random number between 0 and 1.
round Returns the value of a number rounded to the nearest integer.
sin Returns the sine of a number.
sqrt Returns the square root of a number.
tan Returns the tangent of a number.
de kaldes med Math. foran. eg:
var nnn = Math.sqrt(25);
sætter nnn til 5
ingen grund til at give 200+ point for det svar, hent hellere selv en manual:
http://developer.netscape.com/docs/manuals/js/client/jsref/index.htmmvh JakobA