{"size": 1215, "ext": "js", "max_stars_repo_path": "public/lib/next-nxex/geometry/Math.js", "max_stars_repo_name": "CiscoDevNet/Glance", "max_stars_repo_stars_event_min_datetime": "2019-07-15T21:55:21.000Z", "max_stars_repo_stars_event_max_datetime": "2019-08-23T17:41:39.000Z", "max_issues_repo_path": "public/lib/next-nxex/geometry/Math.js", "max_issues_repo_name": "CiscoDevNet/Glance", "max_issues_repo_issues_event_min_datetime": "2021-06-18T02:33:06.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-21T02:45:21.000Z", "max_forks_repo_path": "public/lib/next-nxex/geometry/Math.js", "max_forks_repo_name": "CiscoDevNet/Glance", "max_forks_repo_forks_event_min_datetime": "2021-08-20T10:41:27.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-11T22:27:59.000Z"}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 32.8378378378, "max_line_length": 65, "alphanum_fraction": 0.3794238683}
(function (nx, ui, toolkit, annotation, global) {
    /**
     * @class Math
     * @namespace nxex.geometry
     */
    var EXPORT = nx.define("nxex.geometry.Math", nx.Observable, {
        statics: (function () {
            function precised(f) {
                return function (param) {
                    var v = f(param);
                    return EXPORT.approximate(v, 0) ? 0 : v;
                }
            }
            return {
                approximate: function (a, b, precision) {
                    precision = precision || 1e-10;
                    var v = a - b;
                    return v < precision && v > -precision;
                },
                square: function (v) {
                    return v * v;
                },
                sin: precised(Math.sin),
                cos: precised(Math.cos),
                tan: precised(Math.tan),
                cot: function (a) {
                    var tan = Math.tan(a);
                    if (tan > 1e10 || tan < -1e10) {
                        return 0;
                    }
                    return 1 / tan;
                }
            };
        })()
    });
})(nx, nx.ui, nxex.toolkit, nxex.annotation, window);
