1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-08 07:46: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) for(p = points)
let( let(
v = p - pt, v = p - pt,
offset = (pt + p) / 2 - v / norm(v) * half_region_size, nv = v / norm(v),
a = atan2(v.y, v.x), offset = (pt + p) / 2 - nv * half_region_size,
cosa = cos(a), cosa = nv.x,
sina = sin(a), sina = nv.y,
m = [ m = [
[1, 0, offset.x], [1, 0, offset.x],
[0, 1, offset.y], [0, 1, offset.y],