summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorRicky Curtice <kf6kjg+hg@gmail.com>2014-03-02 14:33:57 -0800
committerRicky Curtice <kf6kjg+hg@gmail.com>2014-03-02 14:33:57 -0800
commite0a015920d3c0f793cadb88b7b8c4cedca61d2fb (patch)
treeea3062709f1198243c6508ed169e25ece4d1822d /indra/llmath
parenta060dcfff790f16dd4a0097e0eca4ff4b7f3d0de (diff)
STORM-1920: Richard fixed and optimized a ton more math.
From Richard: There are a bunch of things I changed...mainly I eliminated all the grid_offset nonsense and instead simply calculate the tick index for the current drag position and use that to generate a snapped position as needed. I still use approx_equal because I want grid numbers to light up even when they aren't the axis you are currently snapping to.
Diffstat (limited to 'indra/llmath')
-rwxr-xr-xindra/llmath/llmath.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index b93f89d674..5abd9a0d06 100755
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -72,6 +72,7 @@ const F32 F_E = 2.71828182845904523536f;
const F32 F_SQRT2 = 1.4142135623730950488016887242097f;
const F32 F_SQRT3 = 1.73205080756888288657986402541f;
const F32 OO_SQRT2 = 0.7071067811865475244008443621049f;
+const F32 OO_SQRT3 = 0.577350269189625764509f;
const F32 DEG_TO_RAD = 0.017453292519943295769236907684886f;
const F32 RAD_TO_DEG = 57.295779513082320876798154814105f;
const F32 F_APPROXIMATELY_ZERO = 0.00001f;