mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-10 08:44:20 +02:00
compare to [0, 0]
This commit is contained in:
@@ -9,13 +9,10 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
function ptf_circle(size, point) =
|
function ptf_circle(size, point) =
|
||||||
let(
|
let(p = point - size / 2)
|
||||||
p = point - size / 2,
|
p == [0, 0] ? p :
|
||||||
leng = norm(p)
|
|
||||||
)
|
|
||||||
leng == 0 ? [0, 0] :
|
|
||||||
let(
|
let(
|
||||||
n = max(abs(p.x), abs(p.y)),
|
n = max(abs(p.x), abs(p.y)),
|
||||||
r = n * 1.41421356237
|
r = n * 1.41421356237
|
||||||
)
|
)
|
||||||
[p.y, p.x] * (r / leng);
|
[p.y, p.x] * (r / norm(p));
|
Reference in New Issue
Block a user