Simbody
Modules

Scalar Functions

Global Functions in the SimTK namespace

These functions are overloaded to act on SimTK scalar types and C++ built-in types, including integral types when appropriate. More...

Modules

 isNaN()
 

isNaN(x) provides a reliable way to determine if x is one of the "not a number" floating point forms.


 isFinite()
 

isFinite(x) provides a reliable way to determine if x is a "normal" floating point number, meaning not a NaN or +/- Infinity.


 isInf()
 

isInf(x) provides a reliable way to determine if x is one of the two infinities (either negative or positive).


 isNumericallyEqual()
 

isNumericallyEqual(x,y) compares two scalar types using a tolerance (default or explicitly specified) and returns true if they are close enough.


 sign()
 

s=sign(n) returns int -1,0,1 according to n<0, n==0, n>0 for any integer or real numeric type, unsigned 0 or 1 for any unsigned argument.


 square()
 

y=square(x) returns the square of the argument for any numeric type.


 cube()
 

y=cube(x) returns the cube of the argument for any numeric type, integral or floating point.


 clamp(), clampInPlace()
 

Limit a numerical value so that it does not go outside a given range.


 Smoothed step functions
 

Functions stepUp(), stepDown() and stepAny() provide smooth, S-shaped step functions that are useful for "softening" abrupt transitions between two values.


 Elliptic integrals
 

Elliptic integrals arise occasionally in contexts relevant to us, particularly in geometric calculations involving ellipses or ellipsoids.



Detailed Description

These functions are overloaded to act on SimTK scalar types and C++ built-in types, including integral types when appropriate.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines