omdl  v0.9.5
OpenSCAD Mechanical Design Library
Scalar Operations

Operations for scalar data types. More...

+ Collaboration diagram for Scalar Operations:

Files

file  scalar_operate.scad
 Scalar data type operations.
 

Functions

function defined_or (v, d)
 Return given value, if defined, or a secondary value, if primary is not defined. More...
 
function index_c (i, l, f=0)
 Return a circular index position. More...
 

Detailed Description

Operations for scalar data types.

Requires:
include <omdl-base.scad>;

Validation Summary

filegroupscriptresultsno testskippedpassedfailedwarning
datatypes/scalar_operate.scadScalar OperationsScriptResults00800

No Failures

See complete validation results.

Function Documentation

◆ defined_or()

function defined_or ( ,
 
)

Return given value, if defined, or a secondary value, if primary is not defined.

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

The value d is returned only when v is equal to undef.

+ Here is the caller graph for this function:

◆ index_c()

function index_c ( ,
,
= 0 
)

Return a circular index position.

Parameters
i<integer> A integer position.
l<integer> The range length.
f<integer> The starting index position.
Returns
<integer> The index position mapped into a circular list within the range [f : l+f-1].