all files / math.js/lib/trigonometric/ index.js

100% Statements 9/9
100% Branches 0/0
100% Functions 8/8
100% Lines 9/9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42                                                                  
module.exports = {
// Trigonometric functions
    sin: function (n) {
        return Math.sin(n);
    },
 
    cos: function (n) {
        return Math.cos(n);
    },
 
    tan: function (n) {
        return Math.tan(n);
    },
 
    acos: function (n) {
        return Math.acos(n);
    },
 
    asin: function (n) {
        return Math.asin(n);
    },
 
    acosh: function (n) {
        return Math.acosh(n);
    },
 
    atan: function (n) {
        return Math.atan(n);
    },
 
    /**
     * Arc tangent of two numbers. Both arguments are used to determine the quadrant of the result.
     * @param y
     * @param x
     * @returns {number} an angle expressed in radians
     */
    atan2: function (y, x) {
        return Math.atan2(y, x);
    }
 
};