square

Macro square 

Source
macro_rules! square {
    ([$x:expr, $y:expr]) => { ... };
    ([$x:expr, $y:expr], $center:expr) => { ... };
    ($size:expr) => { ... };
    ($size:expr, $center:expr) => { ... };
}
Expand description

Creates a square or rectangle.

#params

x: The x dimensions.

y: The y dimensions.

size: The size of a side for a square.

center: Whether to center the square or leave it in the 1st quadrant.

expansion: Scad struct literal.

#patterns

square!([‘x: f64’, ‘y: f64’]);

square!([‘x: f64’, ‘y: f64’], ‘center: bool’);

square!(‘size: f64’);

square!(’size: f64, ‘center: bool’);