aboutsummaryrefslogtreecommitdiff
path: root/vendor/libftm/inc/libftm_vec3.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libftm/inc/libftm_vec3.h')
-rw-r--r--vendor/libftm/inc/libftm_vec3.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/vendor/libftm/inc/libftm_vec3.h b/vendor/libftm/inc/libftm_vec3.h
index c40d6c8..62a6dac 100644
--- a/vendor/libftm/inc/libftm_vec3.h
+++ b/vendor/libftm/inc/libftm_vec3.h
@@ -6,27 +6,28 @@
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/12 11:02:29 by charles #+# #+# */
-/* Updated: 2020/05/13 11:13:12 by charles ### ########.fr */
+/* Updated: 2020/05/14 18:06:33 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFTM_VEC3_H
# define LIBFTM_VEC3_H
-typedef struct
+# include <math.h>
+
+typedef union
{
- union
+ float v[3];
+ struct
{
- float v[3];
- struct
- {
- float x;
- float y;
- float z;
- };
+ float x;
+ float y;
+ float z;
};
} t_ftmvec3;
t_ftmvec3 *ftm_vec3init(t_ftmvec3 *vec3, float x, float y, float z);
+float ftm_vec3norm(t_ftmvec3 *vec3);
+t_ftmvec3 *ftm_vec3normalize(t_ftmvec3 *vec3);
#endif