@task
-@needs('compress')
+# @needs('compress')
+@needs('build')
@cmdopts([
('exclude=', 'x', 'Exclude listed files (separate with commas).')
])
var Y = require('Y').Y
, Vec = require('ezl/math/vec').Vec
+
, _X = 0, _Y = 1
,
+
Circle =
exports['Circle'] =
Y.subclass('Circle', {
timeToMove : function timeToMove(dx,dy){
if (dx instanceof Array) { dy=dx[1]; dx=dx[0]; }
- return Math.abs( Math.acos(dx/this.radius) + Math.asin(dy/this.radius) ) * 0.5; // see note at iparametric
+ var _dx = Math.acos(dx/this.radius)
+ , _dy = Math.asin(dy/this.radius)
+ ;
+ return Math.abs((isNaN(_dx) || isNaN(_dy)) ? (isNaN(_dx) ? _dy : _dx) : ((_dx + _dy) * 0.5)); // see note at iparametric
},
pointAtX : function pointAtX(x){ return this.parametric(Math.acos((x - this.x)/this.radius)); },
*/
timeToMove : function timeToMove(dx,dy){
if (dx instanceof Array) { dy=dx[1]; dx=dx[0]; }
- return (Math.abs(dx/this.pa) + Math.abs(dy/this.pb)) * 0.5; // see note at iparametric
+ var _dx = Math.abs(dx/this.pa)
+ , _dy = Math.abs(dy/this.pb)
+ ;
+ return (isNaN(_dx) || isNaN(_dy)) ? (isNaN(_dx) ? _dy : _dx) : ((_dx + _dy) * 0.5); // see note at iparametric
},
parametric : function parametric(t){
<div id="scripts">
<!--# include file="build/versioned-build.html" -->
-<!--# include file="build/versioned-app.html" -->
+<!--# include file="build/versioned-deps.html" -->
<!--# include file="ga.html" -->
</div>