aboutsummaryrefslogtreecommitdiff
path: root/src/pen-gestures
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-07-11 19:52:33 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-07-11 19:52:33 -0400
commit97456cca47bfe37d8c0b78770d0db88b75289d56 (patch)
tree1d4cf06649538c1283b8875e2e317ef5c36c0df3 /src/pen-gestures
parent6b5c11a26e114f26f3907342f9afbd47b27cecf4 (diff)
parentbf8c338e662327b39cdef3f90c436447e48d2807 (diff)
merged with master & cleaned up formatShapePane
Diffstat (limited to 'src/pen-gestures')
-rw-r--r--src/pen-gestures/ndollar.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pen-gestures/ndollar.ts b/src/pen-gestures/ndollar.ts
index 9d42035d1..ecd8df3e7 100644
--- a/src/pen-gestures/ndollar.ts
+++ b/src/pen-gestures/ndollar.ts
@@ -552,7 +552,7 @@ function Distance(p1: any, p2: any) // distance between two points
}
function CalcStartUnitVector(points: any, index: any) // start angle from points[0] to points[index] normalized as a unit vector
{
- const v = new Point(points[index].X - points[0].X, points[index].Y - points[0].Y);
+ const v = new Point(points[index]?.X - points[0]?.X, points[index]?.Y - points[0]?.Y);
const len = Math.sqrt(v.X * v.X + v.Y * v.Y);
return new Point(v.X / len, v.Y / len);
}