mirror of
https://github.com/recp/cglm.git
synced 2025-12-30 20:27:00 +00:00
docs: fix typos
This commit is contained in:
@@ -15,10 +15,10 @@ makes calculations then copy the result to dest.
|
||||
|
||||
You are responsible for allocation of **src** and **dest** parameters.
|
||||
|
||||
Aligment:
|
||||
Alignment:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
**vec4** and **mat4** types requires 16 byte aligment aligment.
|
||||
**vec4** and **mat4** types requires 16 byte alignment.
|
||||
These types are marked with align attribute to let compiler know about this
|
||||
requirement.
|
||||
|
||||
@@ -26,7 +26,7 @@ But since MSVC (Windows) throws the error:
|
||||
|
||||
**"formal parameter with requested alignment of 16 won't be aligned"**
|
||||
|
||||
The aligment attribute has been commented for MSVC
|
||||
The alignment attribute has been commented for MSVC
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
@@ -36,7 +36,7 @@ The aligment attribute has been commented for MSVC
|
||||
# define CGLM_ALIGN(X) __attribute((aligned(X)))
|
||||
#endif.
|
||||
|
||||
So MSVC may not know about aligment requirements when creating variables.
|
||||
So MSVC may not know about alignment requirements when creating variables.
|
||||
The interesting thing is that, if I remember correctly Visual Studio 2017
|
||||
doesn't throw the above error. So we may uncomment that line for Visual Studio 2017,
|
||||
you may do it yourself.
|
||||
@@ -61,7 +61,7 @@ Again, you may used wrong function.
|
||||
|
||||
For instance if you use **glm_normalize()** or **glm_vec_normalize()** for **vec4**,
|
||||
it will assume that passed param is **vec3** and will normalize it for **vec3**.
|
||||
Since you need to **vec4** to be normalized in your case, you will get wrong results.
|
||||
Since you need to **vec4** to be normalized in your case, you will get wrong results.
|
||||
|
||||
Accessing vec4 type with vec3 functions is valid, you will not get any error, exception or crash.
|
||||
You only get wrong results if you don't know what you are doing!
|
||||
|
||||
Reference in New Issue
Block a user