Hi, there is a bug in RotateBy (+ there again) function.
Currently, it is
var qx = (points[i].x - c.x) * mcos - (points[i].x - c.x) * msin + c.x
var qy = (points[i].x - c.x) * msin + (points[i].x - c.x) * mcos + c.x
but it should be
var qx = (points[i].x - c.x) * mcos - (points[i].y - c.y) * msin + c.x
var qy = (points[i].x - c.x) * msin + (points[i].y - c.y) * mcos + c.y
(.y instead of .x in second half)
implementation for example: https://depts.washington.edu/acelab/proj/dollar/dollar.js
Maybe thats the reason why RotateBy is commented out when building Unistroke? (or you need this to find difference between vertical and horizontal line?)
Hi, there is a bug in RotateBy (+ there again) function.
Currently, it is
but it should be
(
.yinstead of.xin second half)implementation for example: https://depts.washington.edu/acelab/proj/dollar/dollar.js
Maybe thats the reason why RotateBy is commented out when building Unistroke? (or you need this to find difference between vertical and horizontal line?)