2.4 KB、56行 生 Blame 履歴
1/// @ref ext_vector_double1_precision
2/// @file glm/ext/vector_double1_precision.hpp
3///
4/// @defgroup ext_vector_double1_precision GLM_EXT_vector_double1_precision
5/// @ingroup ext
6///
7/// Exposes highp_dvec1, mediump_dvec1 and lowp_dvec1 types.
8///
9/// Include <glm/ext/vector_double1_precision.hpp> to use the features of this extension.
10///
11/// @see ext_vector_double1
12
13#pragma once
14
15#include "../detail/type_vec1.hpp"
16
17#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
18# pragma message("GLM: GLM_EXT_vector_double1_precision extension included")
19#endif
20
21namespace glm
22{
23 /// @addtogroup ext_vector_double1_precision
24 /// @{
25
26 /// 1 component vector of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
27 typedef vec<1, double, highp> highp_dvec1;
28
29 /// 1 component vector of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
30 typedef vec<1, double, mediump> mediump_dvec1;
31
32 /// 1 component vector of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
33 typedef vec<1, double, lowp> lowp_dvec1;
34
35 /// @}
36}//namespace glm
37
38#if GLM_CONFIG_CTOR_INIT == GLM_DISABLE
39static_assert(std::is_trivially_default_constructible<glm::highp_dvec1>::value);
40static_assert(std::is_trivially_default_constructible<glm::mediump_dvec1>::value);
41static_assert(std::is_trivially_default_constructible<glm::lowp_dvec1>::value);
42#endif
43static_assert(std::is_trivially_copy_assignable<glm::highp_dvec1>::value);
44static_assert(std::is_trivially_copy_assignable<glm::mediump_dvec1>::value);
45static_assert(std::is_trivially_copy_assignable<glm::lowp_dvec1>::value);
46static_assert(std::is_trivially_copyable<glm::highp_dvec1>::value);
47static_assert(std::is_trivially_copyable<glm::mediump_dvec1>::value);
48static_assert(std::is_trivially_copyable<glm::lowp_dvec1>::value);
49static_assert(std::is_copy_constructible<glm::highp_dvec1>::value);
50static_assert(std::is_copy_constructible<glm::mediump_dvec1>::value);
51static_assert(std::is_copy_constructible<glm::lowp_dvec1>::value);
52static_assert(glm::highp_dvec1::length() == 1);
53static_assert(glm::mediump_dvec1::length() == 1);
54static_assert(glm::lowp_dvec1::length() == 1);
55static_assert(sizeof(glm::highp_dvec1) == sizeof(glm::mediump_dvec1));
56static_assert(sizeof(glm::highp_dvec1) == sizeof(glm::lowp_dvec1));