1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-07 15:26:39 +02:00

refactor: we don't really need angle

This commit is contained in:
Justin Lin
2022-04-12 20:26:41 +08:00
parent 7b3f27358b
commit 06f144d38b

View File

@@ -18,10 +18,10 @@ function _cells_lt_before_intersection(shape, size, points, pt, half_region_size
for(p = points)
let(
v = p - pt,
offset = (pt + p) / 2 - v / norm(v) * half_region_size,
a = atan2(v.y, v.x),
cosa = cos(a),
sina = sin(a),
nv = v / norm(v),
offset = (pt + p) / 2 - nv * half_region_size,
cosa = nv.x,
sina = nv.y,
m = [
[1, 0, offset.x],
[0, 1, offset.y],