master
ブランチ master
VulkanExample / dep / include / glm / gtx / normalize_dot.hpp
1.5 KB、47行 生 Blame 履歴
1/// @ref gtx_normalize_dot
2/// @file glm/gtx/normalize_dot.hpp
3///
4/// @see core (dependence)
5/// @see gtx_fast_square_root (dependence)
6///
7/// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot
8/// @ingroup gtx
9///
10/// Include <glm/gtx/normalize_dot.hpp> to use the features of this extension.
11///
12/// Dot product of vectors that need to be normalize with a single square root.
13
14#pragma once
15
16// Dependency:
17#include "../gtx/fast_square_root.hpp"
18
19#ifndef GLM_ENABLE_EXPERIMENTAL
20# error "GLM: GLM_GTX_normalize_dot is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
21#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
22# pragma message("GLM: GLM_GTX_normalize_dot extension included")
23#endif
24
25namespace glm
26{
27 /// @addtogroup gtx_normalize_dot
28 /// @{
29
30 /// Normalize parameters and returns the dot product of x and y.
31 /// It's faster that dot(normalize(x), normalize(y)).
32 ///
33 /// @see gtx_normalize_dot extension.
34 template<length_t L, typename T, qualifier Q>
35 GLM_FUNC_DECL T normalizeDot(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
36
37 /// Normalize parameters and returns the dot product of x and y.
38 /// Faster that dot(fastNormalize(x), fastNormalize(y)).
39 ///
40 /// @see gtx_normalize_dot extension.
41 template<length_t L, typename T, qualifier Q>
42 GLM_FUNC_DECL T fastNormalizeDot(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
43
44 /// @}
45}//namespace glm
46
47#include "normalize_dot.inl"