Rename MathUtils to Numerical.

This commit is contained in:
Jürg Lehni 2011-03-07 00:21:04 +00:00
parent 58f5c8554e
commit 9fdbd0146d
5 changed files with 6 additions and 7 deletions

View file

@ -37,7 +37,6 @@
<script type="text/javascript" src="../../src/color/GradientStop.js"></script>
<script type="text/javascript" src="../../src/util/Events.js"></script>
<script type="text/javascript" src="../../src/util/PaperScript.js"></script>
<script type="text/javascript" src="../../src/util/MathUtils.js"></script>
<script type="text/paperscript" canvas="canvas">
var paths = [];

View file

@ -73,8 +73,8 @@ Base.inject({
//#include "tool/Tool.js"
//#include "util/CanvasProvider.js"
//#include "util/MathUtils.js"
//#include "util/Events.js"
//#include "util/Numerical.js"
//#include "util/PaperScript.js"
};

View file

@ -213,7 +213,7 @@ var Curve = this.Curve = Base.extend({
return Math.sqrt(dx * dx + dy * dy);
}
return MathUtils.gauss(ds, 0.0, 1.0, 8);
return Numerical.gauss(ds, 0.0, 1.0, 8);
},
subdivide: function(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
@ -267,8 +267,8 @@ var Curve = this.Curve = Base.extend({
}
// Use length / bezierLength for an initial guess for b, to bring
// us closer:
return MathUtils.brent(f, 0, length / bezierLength,
MathUtils.TOLERANCE);
return Numerical.brent(f, 0, length / bezierLength,
Numerical.TOLERANCE);
}
}
}, new function() {

View file

@ -1,4 +1,4 @@
var MathUtils = new function() {
var Numerical = new function() {
var abscissa = [
-0.5773502692, 0.5773502692,
-0.7745966692, 0.7745966692, 0,

View file

@ -30,7 +30,7 @@
<script type="text/javascript" src="../src/color/RGBColor.js"></script>
<script type="text/javascript" src="../src/color/GrayColor.js"></script>
<script type="text/javascript" src="../src/util/CanvasProvider.js"></script>
<script type="text/javascript" src="../src/util/MathUtils.js"></script>
<script type="text/javascript" src="../src/util/Numerical.js"></script>
<script type="text/javascript" src="lib/qunit/qunit.js"></script>
<!-- Test Helpers -->