Jürg Lehni
ce41447793
Prevent invalid invinite solutions in Numerical.solveQuadratic()
...
Closes #708
2015-06-16 12:30:25 +02:00
Jürg Lehni
27bb8a356f
Implement unique ids, and fix issue with Base.deserialize()
...
Gradient and Symbol were overriding each other in the dictionary, and dictionary entries could not contain references to other dictionary entries.
Closes #690
2015-05-11 19:39:39 +02:00
Jürg Lehni
15813107c0
Remove unused variables.
2015-02-26 13:44:09 +01:00
Jürg Lehni
55e2f6610a
Rename nRoots to count.
2015-01-10 22:06:11 +01:00
Jürg Lehni
22be259167
Deal with edge cases in Curve.solveCubic() where small cubics are very close to lines.
...
Also reduce Numerical.EPSILON again, as required by some rare edge cases.
Relates to #541 .
2015-01-10 22:05:42 +01:00
Jürg Lehni
665d154c95
Simplify control-flow in Numerical.solveCubic() a bit.
2015-01-10 17:57:37 +01:00
Jürg Lehni
814512f562
No need to check solutions for bounds again.
2015-01-05 22:01:56 +01:00
Jürg Lehni
920469426e
Remove the harmony version of Number.isFinite() in favor of the generally available global isFinite() for now.
2015-01-05 16:17:11 +01:00
Jürg Lehni
afc14b9634
Reduce Numerical.TOLERANCE to 1e-6, and use the same value across the boolean code.
...
Yields very good results now, across all tests.
2015-01-04 15:54:50 +01:00
Jürg Lehni
4371e92191
Reduce EPSILON to 1e-13.
...
Reducing further to 1e-14 starts producing new issues in boolean operations code.
2015-01-03 21:03:13 +01:00
Jürg Lehni
6359738618
Do not offset bounds in cubic solver by MACHINE_EPSILON, as this is how comparisons are performed with values offset by tolerances elsewhere in the library.
...
Doing it differently here produced various errors in fat-line clipping and boolean code.
2015-01-02 23:14:19 +01:00
Jürg Lehni
f0fdb804ec
Reduce value of EPSILON to the lowest amount that does not cause issues in boolean-test.
2015-01-02 22:37:36 +01:00
Jürg Lehni
cdfd21ddd3
Switch to using new cubic solver by @hkrish
2015-01-02 21:44:29 +01:00
Jürg Lehni
6a11532322
Clean up and simplify code a bit further.
2014-09-28 11:49:46 +02:00
Jürg Lehni
48cb05a181
Replace tabs with 4 white-spaces.
2014-08-16 19:24:54 +02:00
Jürg Lehni
68db4f9b59
Forgotten in previous commit.
2014-05-13 13:23:37 +02:00
Jürg Lehni
19630d6229
Fix spelling mistakes.
2014-04-24 19:34:49 +02:00
Jürg Lehni
f002c633a7
Remove trailing white spaces and ensure newlines at the end.
2014-04-06 13:48:03 +02:00
Jürg Lehni
e22fa3a664
Update copyright notice.
2014-01-04 01:47:16 +01:00
Jürg Lehni
6654dca6bf
Improve precision of Numerical.findRoot()
2013-12-30 14:18:33 +01:00
Jürg Lehni
8395541298
Clean up docs and fix spelling mistakes.
2013-12-29 15:44:26 +01:00
Jürg Lehni
10aa8d7b4a
Fix accidental documentation leakage into global scope.
2013-12-28 22:34:00 +01:00
Jürg Lehni
a6b3a3a2ec
Share code that handles bounds in roots between solveQuadratic() and solveCubic()
2013-12-17 15:38:22 +01:00
Jürg Lehni
76ea7ef066
Inline EPSILON and TOLERANCE for better performance in Numerical.
2013-12-17 15:27:55 +01:00
Jürg Lehni
b5b75dfce4
Clean-up Numerical code.
2013-12-01 23:54:52 +01:00
hkrish
d64df44a78
Correct tolrance check (±EPSILON) in numerical solving methods.
2013-11-24 21:40:22 +01:00
Jürg Lehni
eae526f38c
Update Numerical.solveQuadratic() / solveCubic() to optionally filter results to be in a given range.
2013-10-18 13:52:01 +02:00
Jürg Lehni
523b9ea592
Fix syntax error.
2013-10-18 11:50:36 +02:00
Jürg Lehni
89704243b1
Simplify Numerical.solveQuadratic()
2013-10-18 11:48:23 +02:00
Jürg Lehni
a07538b205
Use same tolerance in Curve.isLinear() as in Curve#isLinear().
2013-10-17 20:19:34 +02:00
Jürg Lehni
60732e8456
No need for default parameter.
2013-10-10 23:09:18 +02:00
Jürg Lehni
01e48b3322
Improve and clean up fat-line bug fix.
2013-06-13 15:53:28 -07:00
Jürg Lehni
961451b271
Handle exporting of Numerical and PaperScript in export.js
...
Allowing build.sh to work again.
2013-05-27 18:28:35 -07:00
Jürg Lehni
5592bb57e0
Properly export Numerical and PaperScript again.
2013-05-27 15:55:44 -07:00
Jürg Lehni
10d5de3ed6
Implement a better way to name and export class constructors.
...
This change also simplified the way classes are exported to PaperScope objects.
2013-05-27 12:48:58 -07:00
Jürg Lehni
80f9f6061c
Change the way the Line class handles direction vectors and infinite lines.
...
The beginning of performance improvements in the Line class.
2013-05-26 15:44:52 -07:00
Jürg Lehni
dc9a9c42d2
Cleanup solveCubic() further.
2013-04-21 08:44:41 -07:00
Jürg Lehni
e8695dee9b
Replace solveCubic() code with version that does not use cbrt() calls.
2013-04-20 20:04:23 -07:00
Jürg Lehni
6fc2d50939
Remove cbrt() since we don't use it anymore.
2013-04-20 20:00:11 -07:00
Jürg Lehni
c45ad26b67
Remove tolerance parameter from solveCubic() / solveQuadratic() since we should always use EPSILON.
2013-04-20 19:58:42 -07:00
Jürg Lehni
14aa8e5dea
Improve precision of Numerical.solveCubic() and fix issues in Curve.getCrossings().
...
Closes #202 .
2013-04-20 19:14:19 -07:00
Jürg Lehni
53dac53ca0
Restructure code organization by separating canvas related utility classes into separate canvas folder, and move inclusion of utilities classes to beginning.
...
Was needed because Numerical.KAPPA is accessed at compile time.
2013-04-19 19:38:48 -07:00
Jürg Lehni
bf9acd4499
Correct Numerical.KAPPA value.
2013-04-19 18:57:31 -07:00
Jürg Lehni
90f2614d52
Export Numerical object and move KAPPA constant there.
2013-04-19 17:03:41 -07:00
Jürg Lehni
fbe8a558bd
Refactor Format literal to Formatter class that keeps precision stored.
2013-04-09 17:32:19 -07:00
Jürg Lehni
2d3f9c36eb
Update JSDoc and fix documentation issues.
2013-04-09 17:07:41 -07:00
Jürg Lehni
e63b3a0797
Use short-cut to Math.abs()
2013-03-23 17:05:48 -07:00
Jürg Lehni
9d8cddbe42
Implement new private Format object that handles formatting of number, point, size and rectangle.
2013-02-28 19:14:05 -08:00
Jürg Lehni
e9fef8a53c
Fix a couple of newly introduced bugs through CanvasProvider change.
2013-02-12 16:23:30 -08:00
Jürg Lehni
ca3cc7f46d
Define CanvasProvider.getContext() next to getCanvas(), and support both types in release().
2013-02-12 16:06:24 -08:00