Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
300B

  1. /// @ref gtx_normal
  2. /// @file glm/gtx/normal.inl
  3. namespace glm
  4. {
  5. template<typename T, qualifier Q>
  6. GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal
  7. (
  8. vec<3, T, Q> const& p1,
  9. vec<3, T, Q> const& p2,
  10. vec<3, T, Q> const& p3
  11. )
  12. {
  13. return normalize(cross(p1 - p2, p1 - p3));
  14. }
  15. }//namespace glm