1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-24 21:41:33 +02:00
Files
dotSCAD/src/__comm__/__nearest_multiple_of_4.scad
2019-06-23 09:37:02 +08:00

6 lines
130 B
OpenSCAD

function __nearest_multiple_of_4(n) =
let(
remain = n % 4
)
(remain / 4) > 0.5 ? n - remain + 4 : n - remain;