diff options
| author | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-06-18 15:02:50 -0700 |
|---|---|---|
| committer | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-06-18 15:02:50 -0700 |
| commit | 738a56b3c18c06d8290346373eb60a125120caaf (patch) | |
| tree | 88bd022cdf1adf236dab52717c4ac3402e43d94f /src/pen-gestures | |
| parent | cb5fa90bb580c2d618e279275c1e2cb49ce3d90c (diff) | |
hopefully fixed new ink
Diffstat (limited to 'src/pen-gestures')
| -rw-r--r-- | src/pen-gestures/ndollar.ts | 2 |
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); } |
