mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
surround PI with parentheses + code style + update docs
This commit is contained in:
@@ -28,11 +28,11 @@ Alignment is Required:
|
|||||||
vectorized by SIMD instructions (SSE/AVX).
|
vectorized by SIMD instructions (SSE/AVX).
|
||||||
|
|
||||||
**UPDATE:**
|
**UPDATE:**
|
||||||
By starting v0.4.5 cglm provides an option to disable alignment requirement, it is enabled as default
|
By starting v0.4.5 cglm provides an option to disable alignment requirement, it is enabled as default
|
||||||
|
|
||||||
| Check :doc:`opt` page for more details
|
| Check :doc:`opt` page for more details
|
||||||
|
|
||||||
Also alignment is disabled for older msvc verisons as default. Now alignment only is required in Visual Studio 2017 version 15.6+ if CGLM_ALL_UNALIGNED macro is not defined.
|
Also alignment is disabled for older msvc verisons as default. Now alignment is only required in Visual Studio 2017 version 15.6+ if CGLM_ALL_UNALIGNED macro is not defined.
|
||||||
|
|
||||||
Allocations:
|
Allocations:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ you may do it yourself.
|
|||||||
**This MSVC issue is still in TODOs.**
|
**This MSVC issue is still in TODOs.**
|
||||||
|
|
||||||
**UPDATE:** By starting v0.4.5 cglm provides an option to disable alignment requirement.
|
**UPDATE:** By starting v0.4.5 cglm provides an option to disable alignment requirement.
|
||||||
Also alignment is disabled for older msvc verisons as default. Now alignment only is required in Visual Studio 2017 version 15.6+ if CGLM_ALL_UNALIGNED macro is defined.
|
Also alignment is disabled for older msvc verisons as default. Now alignment is only required in Visual Studio 2017 version 15.6+ if CGLM_ALL_UNALIGNED macro is not defined.
|
||||||
|
|
||||||
Crashes, Invalid Memory Access:
|
Crashes, Invalid Memory Access:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ glm_inv_tr_sse2(mat4 mat) {
|
|||||||
r1 = glmm_load(mat[1]);
|
r1 = glmm_load(mat[1]);
|
||||||
r2 = glmm_load(mat[2]);
|
r2 = glmm_load(mat[2]);
|
||||||
r3 = glmm_load(mat[3]);
|
r3 = glmm_load(mat[3]);
|
||||||
x1 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);
|
x1 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
_MM_TRANSPOSE4_PS(r0, r1, r2, x1);
|
_MM_TRANSPOSE4_PS(r0, r1, r2, x1);
|
||||||
|
|
||||||
|
|||||||
@@ -27,17 +27,17 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef float vec2[2];
|
typedef float vec2[2];
|
||||||
typedef CGLM_ALIGN_IF(8) float vec3[3];
|
typedef CGLM_ALIGN_IF(8) float vec3[3];
|
||||||
typedef int ivec3[3];
|
typedef int ivec3[3];
|
||||||
typedef CGLM_ALIGN_IF(16) float vec4[4];
|
typedef CGLM_ALIGN_IF(16) float vec4[4];
|
||||||
|
|
||||||
typedef vec3 mat3[3];
|
typedef vec3 mat3[3];
|
||||||
typedef CGLM_ALIGN_IF(16) vec4 mat4[4];
|
typedef CGLM_ALIGN_IF(16) vec4 mat4[4];
|
||||||
|
|
||||||
typedef vec4 versor;
|
typedef vec4 versor;
|
||||||
|
|
||||||
#define CGLM_PI (float)M_PI
|
#define CGLM_PI ((float)M_PI)
|
||||||
#define CGLM_PI_2 (float)M_PI_2
|
#define CGLM_PI_2 ((float)M_PI_2)
|
||||||
#define CGLM_PI_4 (float)M_PI_4
|
#define CGLM_PI_4 ((float)M_PI_4)
|
||||||
|
|
||||||
#endif /* cglm_types_h */
|
#endif /* cglm_types_h */
|
||||||
|
|||||||
Reference in New Issue
Block a user