mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-23 06:43:10 +02:00
refactor: we don't really need angle
This commit is contained in:
@@ -12,8 +12,11 @@ function ptf_circle(size, point) =
|
||||
let(
|
||||
p_offset = -size / 2,
|
||||
p = point + p_offset,
|
||||
n = max(abs(p.x), abs(p.y)),
|
||||
r = n * 1.414,
|
||||
a = atan2(p.x, p.y)
|
||||
leng = norm(p)
|
||||
)
|
||||
[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