omdl
v0.6.1
OpenSCAD Mechanical Design Library
|
Scalar data type operations. More...
Files | |
file | datatypes-base.scad |
Include file wrapper of data types base primitives. | |
Functions | |
function | defined_or (v, d) |
Return a value when it is defined or a default value when it is not. More... | |
function | circular_index (i, l, f=0) |
Map an index position into a circularly indexed list. More... | |
Scalar data type operations.
See validation results.
function circular_index | ( | i | , |
l | , | ||
f | = 0 |
||
) |
Map an index position into a circularly indexed list.
i | <integer> Any index, in or out of bounds. |
l | <integer> The circular list length. |
f | <integer> The starting index number. |
[f : l+f-1]
. function defined_or | ( | v | , |
d | |||
) |
Return a value when it is defined or a default value when it is not.
v | <value> A value. |
d | <value> A default value. |
v
when it is defined and d
otherwise.