constants.lua 532 B

123456789101112131415161718192021
  1. --- Various useful constants
  2. -- @module constants
  3. --- Constants
  4. -- @table constants
  5. -- @field FLT_EPSILON Floating point precision breaks down
  6. -- @field DBL_EPSILON Double-precise floating point precision breaks down
  7. -- @field DOT_THRESHOLD Close enough to 1 for interpolations to occur
  8. local constants = {}
  9. -- same as C's FLT_EPSILON
  10. constants.FLT_EPSILON = 1.19209290e-07
  11. -- same as C's DBL_EPSILON
  12. constants.DBL_EPSILON = 2.2204460492503131e-16
  13. -- used for quaternion.slerp
  14. constants.DOT_THRESHOLD = 0.9995
  15. return constants