1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 17:54:18 +02:00

refactored

This commit is contained in:
Justin Lin
2017-05-14 13:05:00 +08:00
parent 9ec9ac44de
commit ddc739f4bb

View File

@@ -20,8 +20,9 @@ include <__private__/__trapezium.scad>;
function shape_square(size, corner_r = 0) =
let(
x = __is_vector(size) ? size[0] : size,
y = __is_vector(size) ? size[1] : size
is_vt = __is_vector(size),
x = is_vt ? size[0] : size,
y = is_vt ? size[1] : size
)
__trapezium(
radius = x / 2,