#ifndef SWIFT_MATHS_VEC4F_H
#define SWIFT_MATHS_VEC4F_H

#include <swift/stdlib.h>

#include <swift/maths/api.h>

typedef union swift_mat4f_t swift_mat4f_t;
typedef union swift_vec4f_t swift_vec4f_t;

union swift_vec4f_t {
	struct {
		float r, g, b, a;
	}rgba;

	struct {
		float x, y, w, h;
	}xywh;

	float data[4];
};


#define SWIFT_VEC4F(...) ((swift_vec4f_t){__VA_ARGS__})

SWIFT_MATHS_API swift_vec4f_t swift_vec4f_zero(void);
SWIFT_MATHS_API swift_vec4f_t swift_vec4f_neg(swift_vec4f_t vec);
SWIFT_MATHS_API swift_vec4f_t swift_vec4f_add_scalar(swift_vec4f_t lhs,
	float rhs);
SWIFT_MATHS_API swift_vec4f_t swift_vec4f_sub_scalar(swift_vec4f_t lhs,
	float rhs);
SWIFT_MATHS_API swift_vec4f_t swift_vec4f_mul_scalar(swift_vec4f_t lhs,
	float rhs);
SWIFT_MATHS_API swift_vec4f_t swift_vec4f_div_scalar(swift_vec4f_t lhs,
	float rhs);
SWIFT_MATHS_API swift_vec4f_t swift_vec4f_add(swift_vec4f_t lhs,
	swift_vec4f_t rhs);
SWIFT_MATHS_API swift_vec4f_t swift_vec4f_sub(swift_vec4f_t lhs,
	swift_vec4f_t rhs);
SWIFT_MATHS_API float swift_vec4f_dot(swift_vec4f_t lhs, swift_vec4f_t rhs);
SWIFT_MATHS_API swift_mat4f_t swift_vec4f_tensor(swift_vec4f_t lhs,
	swift_vec4f_t rhs);
SWIFT_MATHS_API float swift_vec4f_norm(swift_vec4f_t vec);
SWIFT_MATHS_API swift_vec4f_t swift_vec4f_normalise(swift_vec4f_t vec);
SWIFT_MATHS_API swift_vec4f_t swift_rgba(uint8_t r, uint8_t g, uint8_t b,
	uint8_t a);
#endif /* SWIFT_MATHS_VEC4F_H */
