summaryrefslogtreecommitdiff
path: root/src/glm/gtx/perpendicular.inl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glm/gtx/perpendicular.inl')
-rw-r--r--src/glm/gtx/perpendicular.inl40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/glm/gtx/perpendicular.inl b/src/glm/gtx/perpendicular.inl
new file mode 100644
index 0000000..2b49371
--- /dev/null
+++ b/src/glm/gtx/perpendicular.inl
@@ -0,0 +1,40 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Created : 2005-12-21
+// Updated : 2009-03-06
+// Licence : This source is under MIT License
+// File : glm/gtx/perpendicular.inl
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace glm{
+namespace gtx{
+namespace perpendicular{
+
+template <typename T>
+GLM_FUNC_QUALIFIER detail::tvec2<T> perp(
+ detail::tvec2<T> const & x,
+ detail::tvec2<T> const & Normal)
+{
+ return x - projection::proj(x, Normal);
+}
+
+template <typename T>
+GLM_FUNC_QUALIFIER detail::tvec3<T> perp(
+ detail::tvec3<T> const & x,
+ detail::tvec3<T> const & Normal)
+{
+ return x - projection::proj(x, Normal);
+}
+
+template <typename T>
+GLM_FUNC_QUALIFIER detail::tvec4<T> perp(
+ detail::tvec4<T> const & x,
+ detail::tvec4<T> const & Normal)
+{
+ return x - projection::proj(x, Normal);
+}
+
+}//namespace perpendicular
+}//namespace gtx
+}//namespace glm