Difference between revisions of "Math (lxu-math.hpp)"

From The Foundry MODO SDK wiki
Jump to: navigation, search
 
Line 1: Line 1:
 +
{{DISPLAYTITLE:Math (lxu_math.hpp)}}
 
The math utility header contains functions, templates and utility classes for doing some common math operations.
 
The math utility header contains functions, templates and utility classes for doing some common math operations.
  

Latest revision as of 18:24, 16 August 2013

The math utility header contains functions, templates and utility classes for doing some common math operations.

Floats (lx namespace)

  • IEEEFloatTest() -- checks for NaNs
  • Smooth() -- cubic interpolation

Matrices (lx namespace)

  • MatrixCopy()
  • MatrixMultiply()
  • Matrix4Copy()
  • Matrix4Multiply()
  • MatrixAxisRotation()

CLxPseudoRandom

Class with methods for getting random numbers.

  • seed() -- set the seed
  • uniform() -- value from 0 to 1
  • centered() -- value from -1 to 1
  • range(n) -- value from zero to less than n (int & float)
  • range(low,high) -- value from low to less than high (int & float)
  • vary(base,delta) -- value from base-delta to base+delta
  • normal() -- value in normal distribution around zero with stddev of 1 (approximate)