Operatory arytmetyczne JavaScript (JavaScript arithmetic operators)
|
| + | dodawanie | addition |
| - | odejmowanie | subtraction |
| * | mnożenie | multiplication |
| / | dzielenie | division |
Stałe matematyczne JavaScript (JavaScript mathematical constants)
|
| Math.E | liczba Eulera (e) | Euler's number (≈2.718) |
| Math.LN2 | logarytm naturalny z 2 | natural logarithm of 2 (≈0.693) |
| Math.LN10 | logarytm naturalny z 10 | natural logarithm of 10 (≈2.302) |
| Math.LOG2E | logarytm o podstawie 2 z e | base-2 logarithm of E (≈1.442) |
| Math.LOG10E | logarytm dziesiętny z e | base-10 logarithm of E (≈0.434) |
| Math.PI | liczba π | π (≈3.14159) |
| Math.SQRT1_2 | pierwiastek kwadratowy z 1/2 | square root of 1/2 (≈0.707) |
| Math.SQRT2 | pierwiastek kwadratowy z 2 | square root of 2 (≈1.414) |
Funkcje matematyczne JavaScript (JavaScript mathematical functions)
|
| Math.abs(x) | wartość bezwzględna z x | absolute value of x |
| Math.acos(x) | arcus cosinus x, w radianach | arc cosine of x, in radians |
| Math.asin(x) | arcus sinus x, w radianach | arc sine of x, in radians |
| Math.atan(x) | arcus tangens x, w radianach (od -pi/2 do pi/2) | arc tangent of x, in radians (between -PI/2 and PI/2) |
| Math.atan2(y,x) | arctan2 y / x, w radianach | arc tangent of y / x, in radians |
| Math.ceil(x) | x zaokrąglona w górę do liczby całkowitej | x rounded upwards to the nearest integer |
| Math.cos(x) | cosinus x (x w radianach) | cosine of x (x in radians) |
| Math.exp(x) | e do potęgi x | value of Ex |
| Math.floor(x) | x zaokrąglona w dół do liczby całkowitej | x rounded downwards to the nearest integer |
| Math.log(x) | logarytm naturalny (o podstawie e) z x | natural logarithm (base E) of x |
| Math.max(x,y,z,...,n) | największa liczba | number with the highest value |
| Math.min(x,y,z,...,n) | najmniejsza liczba | number with the lowest value |
| Math.pow(x,y) | x do potęgi y | x to the power of y |
| Math.random() | przypadkowa liczba pomiędzy 0 i 1 | random number between 0 and 1 |
| Math.round(x) | x zaokrąglona do najbliższej liczby całkowitej | x rounded to the nearest integer |
| Math.sin(x) | sinus x (x w radianach) | sine of x (x in radians) |
| Math.sqrt(x) | pierwiastek kwadratowy z x | square root of x |
| Math.tan(x) | tangens x (x w radianach) | tangent of x (x in radians) |
| |
| Math.log(x) / Math.LN10 | logarytm dziesiętny z x | common logarithm (base 10) of x |
| x * Math.PI / 180 | zamiana stopni na radiany | converts x from degrees to radians |
| x * 180 / Math.PI | zamiana radianów na stopnie | converts x from radians to degrees |
Dodatkowe funkcje (Custom functions)
|
| Log(x) | logarytm dziesiętny z x | common logarithm (base 10) of x |
| Cos(x) | cosinus x (x w stopniach) | cosine of x (x in degrees) |
| Sin(x) | sinus x (x w stopniach) | sine of x (x is degrees) |
| Tan(x) | tangens x (x w stopniach) | tangent of x (x in degrees) |
| ctan(x) | cotangens x (x w radianach) | cotangent of x (x in radians) |
| Ctan(x) | cotangens x (x w stopniach) | cotangent of x (x in degrees) |
| Acos(x) | arcus cosinus x, w stopniach | arc cosine of x, in degrees |
| Asin(x) | arcus sinus x, w stopniach | arc sine of x, in degrees |
| Atan(x) | arcus tangens x, w stopniach (od -180 do 180) | arc tangent of x, in degrees (between -180 and 180) |
| Actan(x) | arcus cotangens x, w stopniach (od -180 do 180) | arc cotangent of x, in degrees (between -180 and 180) |
| Atan2(y,x) | arcus tangens y / x, w stopniach | arc tangent of y / x, in degrees |
| Fact(x) | x! (x silnia) | factorial of x |
| Diag(x,y) | przekątna prostokąta (przeciwprostokątna trójkąta) | diagonal of a rectangle (hypotenuse of a triangle) |
| Round(x,y) | x zaokrąglona do y miejsc po przecinku | x rounded to y decimal places |