#ifndef SWIFT_MATHS_MAT3F_H
#define SWIFT_MATHS_MAT3F_H

#include <swift/stdlib.h>

#include <swift/maths/api.h>

typedef union swift_mat3f_t swift_mat3f_t;
typedef union swift_quatf_t swift_quatf_t;
typedef union swift_vec3f_t swift_vec3f_t;

union swift_mat3f_t {
	struct {
		float m00, m10, m20;
		float m01, m11, m21;
		float m02, m12, m22;
	}m;
	float data[3*3];
};

#define SWIFT_MAT3F(...) ((swift_mat3f_t){__VA_ARGS__})

SWIFT_MATHS_API swift_mat3f_t swift_mat3f_zero(void);
SWIFT_MATHS_API swift_mat3f_t swift_mat3f_identity(void);
SWIFT_MATHS_API swift_mat3f_t swift_mat3f_from_quatf(swift_quatf_t quat);
SWIFT_MATHS_API swift_mat3f_t swift_mat3f_cpm_from_vec3f(swift_vec3f_t vec);
SWIFT_MATHS_API swift_mat3f_t swift_mat3f_scaling(swift_vec3f_t vec);
SWIFT_MATHS_API swift_mat3f_t swift_mat3f_rotation(float angle,
	swift_vec3f_t axis);
SWIFT_MATHS_API swift_mat3f_t swift_mat3f_mul_scalar(swift_mat3f_t mat,
	float scalar);
SWIFT_MATHS_API swift_mat3f_t swift_mat3f_add(swift_mat3f_t lhs,
	swift_mat3f_t rhs);

#endif /* SWIFT_MATHS_MAT3F_H */
