omdl  v0.6.1
OpenSCAD Mechanical Design Library

Scalar data type operations. More...

+ Collaboration diagram for Scalars:

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...
 

Detailed Description

Scalar data type operations.

See validation results.

Function Documentation

function circular_index ( ,
,
= 0 
)

Map an index position into a circularly indexed list.

Parameters
i<integer> Any index, in or out of bounds.
l<integer> The circular list length.
f<integer> The starting index number.
Returns
<integer> A index position in the circular list within the range [f : l+f-1].
function defined_or ( ,
 
)

Return a value when it is defined or a default value when it is not.

Parameters
v<value> A value.
d<value> A default value.
Returns
<value> v when it is defined and d otherwise.

+ Here is the caller graph for this function: