mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-23 23:03:23 +02:00
refactor: we don't really need angle
This commit is contained in:
@@ -12,8 +12,11 @@ function ptf_circle(size, point) =
|
|||||||
let(
|
let(
|
||||||
p_offset = -size / 2,
|
p_offset = -size / 2,
|
||||||
p = point + p_offset,
|
p = point + p_offset,
|
||||||
n = max(abs(p.x), abs(p.y)),
|
leng = norm(p)
|
||||||
r = n * 1.414,
|
|
||||||
a = atan2(p.x, p.y)
|
|
||||||
)
|
)
|
||||||
[r * cos(a), r * sin(a)];
|
leng == 0 ? [0, 0] :
|
||||||
|
let(
|
||||||
|
n = max(abs(p.x), abs(p.y)),
|
||||||
|
r = n * 1.414
|
||||||
|
)
|
||||||
|
[p.y, p.x] * (r / leng);
|
Reference in New Issue
Block a user