aboutsummaryrefslogtreecommitdiff
path: root/primedev/core/math/math_pfns.h
diff options
context:
space:
mode:
Diffstat (limited to 'primedev/core/math/math_pfns.h')
-rw-r--r--primedev/core/math/math_pfns.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/primedev/core/math/math_pfns.h b/primedev/core/math/math_pfns.h
new file mode 100644
index 00000000..4dca9806
--- /dev/null
+++ b/primedev/core/math/math_pfns.h
@@ -0,0 +1,7 @@
+#pragma once
+
+inline float FastSqrt(float x)
+{
+ __m128 root = _mm_sqrt_ss(_mm_load_ss(&x));
+ return *(reinterpret_cast<float*>(&root));
+}