Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynekstara authored Mar 27, 2024
1 parent 2cc66d3 commit e8de8b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/joint-core/src/V/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2293,7 +2293,7 @@ const V = (function() {

var k = ((large_arc_flag == sweep_flag) ? -1 : 1) * sqrt(abs(((rx2 * ry2) - (rx2 * y * y) - (ry2 * x * x)) / ((rx2 * y * y) + (ry2 * x * x))));
if (!Number.isFinite(k)) {
// Straight line
// Arc is a single point
return [x1, y1, x2, y2, x2, y2];
}

Expand Down
2 changes: 1 addition & 1 deletion packages/joint-core/test/vectorizer/vectorizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ QUnit.module('vectorizer', function(hooks) {
assert.equal(V.normalizePathData('A 3 0 0 0 1 10 15'), 'M 0 0 L 10 15'); // 0 y radius
assert.equal(V.normalizePathData('A 0 0 0 0 1 10 15'), 'M 0 0 L 10 15'); // 0 x and y radii

assert.equal(V.normalizePathData('M 3 7 A 7 7 0 0 1 3 7'), 'M 3 7 C 3 7 3 7 3 7'); // straight line
assert.equal(V.normalizePathData('M 3 7 A 7 7 0 0 1 3 7'), 'M 3 7 C 3 7 3 7 3 7'); // arc corresponding to a single point

// Make sure this does not throw an error because of recursion in a2c() exceeding the maximum stack size
V.normalizePathData('M 0 0 A 1 1 0 1 0 -1 -1');
Expand Down

0 comments on commit e8de8b1

Please sign in to comment.