Closed scien closed 1 year ago
The following paths will cause getTotalLength() to return Infinity.
getTotalLength()
It ends up using getQuadraticArcLength() in bezier-functions.
getQuadraticArcLength()
term
Math.log(-0)
-Infinity
(u + uuk) / (b + bbk)
(u + uuk)
(b + bbk)
Math.sqrt
In example 1 ("Q 0 0 267 0 Q 391 0 512 0"), we get the following:
The following paths will cause
getTotalLength()
to return Infinity.It ends up using
getQuadraticArcLength()
in bezier-functions.term
is infinity.term
is Infinity becauseMath.log(-0)
is-Infinity
(u + uuk) / (b + bbk)
is zero or negative zero(u + uuk)
is 0, but(b + bbk)
is very small but non-zero due to float precision duringMath.sqrt
In example 1 ("Q 0 0 267 0 Q 391 0 512 0"), we get the following: