|
Last change
on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
492 bytes
|
| Line | |
|---|
| 1 | export const abs = Math.abs;
|
|---|
| 2 | export const atan2 = Math.atan2;
|
|---|
| 3 | export const cos = Math.cos;
|
|---|
| 4 | export const max = Math.max;
|
|---|
| 5 | export const min = Math.min;
|
|---|
| 6 | export const sin = Math.sin;
|
|---|
| 7 | export const sqrt = Math.sqrt;
|
|---|
| 8 |
|
|---|
| 9 | export const epsilon = 1e-12;
|
|---|
| 10 | export const pi = Math.PI;
|
|---|
| 11 | export const halfPi = pi / 2;
|
|---|
| 12 | export const tau = 2 * pi;
|
|---|
| 13 |
|
|---|
| 14 | export function acos(x) {
|
|---|
| 15 | return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | export function asin(x) {
|
|---|
| 19 | return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
|
|---|
| 20 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.