Math (lxu_math.hpp)

From The Foundry MODO SDK wiki
Jump to: navigation, search

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)