Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angles

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angles - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

6

angles.js
/**
* @license Angles.js v0.2.1 08/04/2016
* @license Angles.js v0.2.2 08/04/2016
*

@@ -288,5 +288,5 @@ * Copyright (c) 2015, Robert Eisele (robert@xarg.org)

Object.defineProperty(exports, "__esModule", {'value': true});
Angles['default'] = Angles;
Angles['Angles'] = Angles;
module['exports'] = Angles;
exports['Angles'] = Angles;
exports['default'] = Angles;
} else {

@@ -293,0 +293,0 @@ root['Angles'] = Angles;

/*
Angles.js v0.2.1 08/04/2016
Angles.js v0.2.2 08/04/2016
Copyright (c) 2015, Robert Eisele (robert@xarg.org)
Dual licensed under the MIT or GPL Version 2 licenses.
Copyright (c) 2015, Robert Eisele (robert@xarg.org)
Dual licensed under the MIT or GPL Version 2 licenses.
*/
(function(l){function f(a,b){return(a%b+b)%b}var g=2*Math.PI,k="N NE E SE S SW W NW".split(" "),h={SCALE:360,normalizeHalf:function(a){var b=this.SCALE,c=b/2;return f(a+c,b)-c},normalize:function(a){return f(a,this.SCALE)},shortestDirection:function(a,b){return a===b?0:0>this.normalizeHalf(a-b)?-1:1},between:function(a,b,c){var d=this.SCALE;a=f(a,d);b=f(b,d);c=f(c,d);return b<c?b<=a&&a<=c:b<=a||a<=c},diff:function(a,b){return Math.abs(b-a)%this.SCALE},distance:function(a,b){var c=this.SCALE,d=c/2,
e=this.normalizeHalf(a-b);e>d&&(e-=c);return Math.abs(e)},toRad:function(a){return a/this.SCALE*g},toDeg:function(a){return a/this.SCALE*360},toGon:function(a){return a/this.SCALE*400},fromSinCos:function(a,b){var c=this.SCALE,d=(1+Math.acos(b)/g)*c;0>a&&(d=c-d);return f(d,c)},fromSlope:function(a,b){return(g+Math.atan2(b[1]-a[1],b[0]-a[0]))%g/g*this.SCALE},quadrant:function(a,b,c,d){var e=this.SCALE;void 0===c&&(c=4);void 0===d&&(d=0);a=(Math.atan2(b,a)+g)/g;return 1E-15>Math.abs(a*e%(e/c))?0:1+
f(Math.floor(c*d/e+c*a),c)},compass:function(a){var b=k.length;return k[f(Math.round(a/this.SCALE*b),b)]},lerp:function(a,b,c,d){var e=this.SCALE;a=f(a,e);b=f(b,e);return a===b?a:f(a+c*(b-a-(d?1===d===a<b?d*e:0:-e)),e)}};"function"===typeof define&&define.amd?define([],function(){return h}):"object"===typeof exports?(Object.defineProperty(exports,"__esModule",{value:!0}),module.exports=h,exports.Angles=h,exports["default"]=h):l.Angles=h})(this);
f(Math.floor(c*d/e+c*a),c)},compass:function(a){var b=k.length;return k[f(Math.round(a/this.SCALE*b),b)]},lerp:function(a,b,c,d){var e=this.SCALE;a=f(a,e);b=f(b,e);return a===b?a:f(a+c*(b-a-(d?1===d===a<b?d*e:0:-e)),e)}};"function"===typeof define&&define.amd?define([],function(){return h}):"object"===typeof exports?(Object.defineProperty(exports,"__esModule",{value:!0}),h["default"]=h,h.Angles=h,module.exports=h):l.Angles=h})(this);
{
"name": "angle",
"main": "angles.js",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "https://github.com/infusion/Angles.js",

@@ -6,0 +6,0 @@ "description": "A function collection for working with angles",

{
"name": "angles",
"title": "angles.js",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "https://github.com/infusion/Angles.js",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/infusion/Angles.js/issues",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc