MathDefs.pkg 866 B

12345678910111213141516171819202122232425262728293031323334
  1. $#include "MathDefs.h"
  2. static const float M_PI;
  3. static const int M_MIN_INT;
  4. static const int M_MAX_INT;
  5. static const unsigned M_MIN_UNSIGNED;
  6. static const unsigned M_MAX_UNSIGNED;
  7. static const float M_EPSILON;
  8. static const float M_LARGE_EPSILON;
  9. static const float M_MIN_NEARCLIP;
  10. static const float M_MAX_FOV;
  11. static const float M_LARGE_VALUE;
  12. static const float M_INFINITY;
  13. static const float M_DEGTORAD;
  14. static const float M_DEGTORAD_2;
  15. static const float M_RADTODEG;
  16. enum Intersection
  17. {
  18. OUTSIDE,
  19. INTERSECTS,
  20. INSIDE
  21. };
  22. float Lerp(float lhs, float rhs, float t);
  23. float Min(float lhs, float rhs);
  24. float Max(float lhs, float rhs);
  25. float Abs(float value);
  26. float Clamp(float value, float min, float max);
  27. bool Equals(float lhs, float rhs);
  28. float Random();
  29. float Random(float range);
  30. int Random @ RandomInt(int range);