#ifndef SWIFT_MATHS_VEC4U_H
#define SWIFT_MATHS_VEC4U_H

#include <swift/stdlib.h>

#include <swift/maths/api.h>

typedef union swift_vec4u_t swift_vec4u_t;

union swift_vec4u_t {
	struct {
		unsigned int x, y, w, h;
	}xywh;

	struct {
		unsigned int r, g, b, a;
	}rgba;

	unsigned int data[4];
};

#define SWIFT_VEC4U(...) ((swift_vec4u_t){__VA_ARGS__})

SWIFT_MATHS_API swift_vec4u_t swift_vec4u_zero(void);
SWIFT_MATHS_API swift_vec4u_t swift_vec4u_neg(swift_vec4u_t vec);
SWIFT_MATHS_API swift_vec4u_t swift_vec4u_add_scalar(swift_vec4u_t lhs,
	unsigned int rhs);
SWIFT_MATHS_API swift_vec4u_t swift_vec4u_sub_scalar(swift_vec4u_t lhs,
	unsigned int rhs);
SWIFT_MATHS_API swift_vec4u_t swift_vec4u_mul_scalar(swift_vec4u_t lhs,
	unsigned int rhs);
SWIFT_MATHS_API swift_vec4u_t swift_vec4u_div_scalar(swift_vec4u_t lhs,
	unsigned int rhs);
SWIFT_MATHS_API swift_vec4u_t swift_vec4u_add(swift_vec4u_t lhs,
	swift_vec4u_t rhs);
SWIFT_MATHS_API swift_vec4u_t swift_vec4u_sub(swift_vec4u_t lhs,
	swift_vec4u_t rhs);
SWIFT_MATHS_API unsigned int swift_vec4u_dot(swift_vec4u_t lhs,
	swift_vec4u_t rhs);
SWIFT_MATHS_API unsigned int swift_vec4u_norm(swift_vec4u_t vec);
SWIFT_MATHS_API swift_vec4u_t swift_vec4u_normalise(swift_vec4u_t vec);

#endif /* SWIFT_MATHS_VEC4U_H */
