float2 :: struct {
	x : float;
	y : float;
}

float3 :: struct {
	x : float;
	y : float;
	z : float;
}

float4 :: struct {
	x : float;
	y : float;
	z : float;
	w : float;
}

float4x4 :: struct {
	m11	: float;
	m12	: float;
	m13	: float;
	m14	: float;
	m21	: float;
	m22	: float;
	m23	: float;
	m24	: float;
	m31	: float;
	m32	: float;
	m33	: float;
	m34	: float;
	m41	: float;
	m42	: float;
	m43	: float;
	m44 : float;
}

int2 :: struct {
	x : int;
	y : int;
}

int3 :: struct {
	x : int;
	y : int;
	z : int;
}

int4 :: struct {
	x : int;
	y : int;
	z : int;
	w : int;
}

int4x4 :: struct {
	m11	: int;
	m12	: int;
	m13	: int;
	m14	: int;
	m21	: int;
	m22	: int;
	m23	: int;
	m24	: int;
	m31	: int;
	m32	: int;
	m33	: int;
	m34	: int;
	m41	: int;
	m42	: int;
	m43	: int;
	m44 : int;
}

//~ nbr: Constructors
#foreign float2 :: (float, float) -> float2;
#foreign float2 :: (float2) -> float2;
#foreign float2 :: (float) -> float2;

#foreign float3 :: (float, float, float) -> float3;
#foreign float3 :: (float3) -> float3;
#foreign float3 :: (float2, float) -> float3;
#foreign float3 :: (float, float2) -> float3;
#foreign float3 :: (float) -> float3;

#foreign float4 :: (float, float, float, float) -> float4;
#foreign float4 :: (float4) -> float4;
#foreign float4 :: (float2, float2) -> float4;
#foreign float4 :: (float2, float, float) -> float4;
#foreign float4 :: (float, float2, float) -> float4;
#foreign float4 :: (float, float, float2) -> float4;
#foreign float4 :: (float3, float) -> float4;
#foreign float4 :: (float, float3) -> float4;
#foreign float4 :: (float) -> float4;

//~ nbr: Vectors
#foreign cross :: (float3, float3) -> float3;
#foreign distance :: (float2, float2) -> float;
#foreign distance :: (float3, float3) -> float;
#foreign distance :: (float4, float4) -> float;

#foreign length :: (float2) -> float;
#foreign length :: (float3) -> float;
#foreign length :: (float4) -> float;

#foreign dot :: (float2, float2) -> float;
#foreign dot :: (float3, float3) -> float;
#foreign dot :: (float4, float4) -> float;

#foreign normalize :: (float2) -> float2;
#foreign normalize :: (float3) -> float3;
#foreign normalize :: (float4) -> float4;

#foreign transpose :: (float4x4) -> float4x4;

//~ nbr: Multiplies
#foreign mul :: (float2, float2) -> float;
#foreign mul :: (float3, float3) -> float;
#foreign mul :: (float4, float4) -> float;
#foreign mul :: (float4x4, float4x4) -> float4x4;
#foreign mul :: (float, float2) -> float2;
#foreign mul :: (float, float3) -> float3;
#foreign mul :: (float, float4) -> float4;

#foreign mul :: (float, float4x4) -> float4x4;
#foreign mul :: (float4x4, float) -> float4x4;
#foreign mul :: (float4x4, float4) -> float4;
#foreign mul :: (float2, float) -> float2;
#foreign mul :: (float3, float) -> float3;
#foreign mul :: (float4, float) -> float4;

#foreign mul :: (float4, float4x4) -> float4x4;

//~ nbr: General
#foreign abs :: (float) -> float;
#foreign abs :: (float2) -> float2;
#foreign abs :: (float3) -> float3;
#foreign abs :: (float4) -> float4;
#foreign abs :: (float4x4) -> float4x4;

#foreign min :: (float) -> float;
#foreign min :: (float2) -> float2;
#foreign min :: (float3) -> float3;
#foreign min :: (float4) -> float4;
#foreign min :: (float4x4) -> float4x4;

#foreign max :: (float) -> float;
#foreign max :: (float2) -> float2;
#foreign max :: (float3) -> float3;
#foreign max :: (float4) -> float4;
#foreign max :: (float4x4) -> float4x4;

#foreign ceil :: (float) -> float;
#foreign ceil :: (float2) -> float2;
#foreign ceil :: (float3) -> float3;
#foreign ceil :: (float4) -> float4;
#foreign ceil :: (float4x4) -> float4x4;

#foreign floor :: (float) -> float;
#foreign floor :: (float2) -> float2;
#foreign floor :: (float3) -> float3;
#foreign floor :: (float4) -> float4;
#foreign floor :: (float4x4) -> float4x4;

#foreign round :: (float) -> float;
#foreign round :: (float2) -> float2;
#foreign round :: (float3) -> float3;
#foreign round :: (float4) -> float4;
#foreign round :: (float4x4) -> float4x4;

#foreign clamp :: (float, float, float) -> float;
#foreign clamp :: (float2, float2, float2) -> float2;
#foreign clamp :: (float3, float3, float3) -> float3;
#foreign clamp :: (float4, float4, float4) -> float4;
#foreign clamp :: (float4x4, float4x4, float4x4) -> float4x4;

#foreign log :: (float) -> float;
#foreign log :: (float2) -> float2;
#foreign log :: (float3) -> float3;
#foreign log :: (float4) -> float4;
#foreign log :: (float4x4) -> float4x4;

#foreign log2 :: (float) -> float;
#foreign log2 :: (float2) -> float2;
#foreign log2 :: (float3) -> float3;
#foreign log2 :: (float4) -> float4;
#foreign log2 :: (float4x4) -> float4x4;

#foreign log10 :: (float) -> float;
#foreign log10 :: (float2) -> float2;
#foreign log10 :: (float3) -> float3;
#foreign log10 :: (float4) -> float4;
#foreign log10 :: (float4x4) -> float4x4;

#foreign pow :: (float, float, float) -> float;
#foreign pow :: (float2, float2, float2) -> float2;
#foreign pow :: (float3, float3, float3) -> float3;
#foreign pow :: (float4, float4, float4) -> float4;
#foreign pow :: (float4x4, float4x4, float4x4) -> float4x4;

#foreign smoothstep :: (float, float, float) -> float;
#foreign smoothstep :: (float2, float2, float2) -> float2;
#foreign smoothstep :: (float3, float3, float3) -> float3;
#foreign smoothstep :: (float4, float4, float4) -> float4;
#foreign smoothstep :: (float4x4, float4x4, float4x4) -> float4x4;

#foreign step :: (float, float) -> float;
#foreign step :: (float2, float2) -> float2;
#foreign step :: (float3, float3) -> float3;
#foreign step :: (float4, float4) -> float4;
#foreign step :: (float4x4, float4x4) -> float4x4;

#foreign sqrt :: (float) -> float;
#foreign sqrt :: (float2) -> float2;
#foreign sqrt :: (float3) -> float3;
#foreign sqrt :: (float4) -> float4;
#foreign sqrt :: (float4x4) -> float4x4;



//~ nbr: Trigonometry
#foreign cos :: (float) -> float;
#foreign cos :: (float2) -> float2;
#foreign cos :: (float3) -> float3;
#foreign cos :: (float4) -> float4;
#foreign cos :: (float4x4) -> float4x4;

#foreign cosh :: (float) -> float;
#foreign cosh :: (float2) -> float2;
#foreign cosh :: (float3) -> float3;
#foreign cosh :: (float4) -> float4;
#foreign cosh :: (float4x4) -> float4x4;

#foreign acos :: (float) -> float;
#foreign acos :: (float2) -> float2;
#foreign acos :: (float3) -> float3;
#foreign acos :: (float4) -> float4;
#foreign acos :: (float4x4) -> float4x4;

#foreign sin :: (float) -> float;
#foreign sin :: (float2) -> float2;
#foreign sin :: (float3) -> float3;
#foreign sin :: (float4) -> float4;
#foreign sin :: (float4x4) -> float4x4;

#foreign sinh :: (float) -> float;
#foreign sinh :: (float2) -> float2;
#foreign sinh :: (float3) -> float3;
#foreign sinh :: (float4) -> float4;
#foreign sinh :: (float4x4) -> float4x4;

#foreign asin :: (float) -> float;
#foreign asin :: (float2) -> float2;
#foreign asin :: (float3) -> float3;
#foreign asin :: (float4) -> float4;
#foreign asin :: (float4x4) -> float4x4;

#foreign tan :: (float) -> float;
#foreign tan :: (float2) -> float2;
#foreign tan :: (float3) -> float3;
#foreign tan :: (float4) -> float4;
#foreign tan :: (float4x4) -> float4x4;

#foreign tanh :: (float) -> float;
#foreign tanh :: (float2) -> float2;
#foreign tanh :: (float3) -> float3;
#foreign tanh :: (float4) -> float4;
#foreign tanh :: (float4x4) -> float4x4;

#foreign atan :: (float) -> float;
#foreign atan :: (float2) -> float2;
#foreign atan :: (float3) -> float3;
#foreign atan :: (float4) -> float4;
#foreign atan :: (float4x4) -> float4x4;

#foreign atan2 :: (float, float) -> float;
#foreign atan2 :: (float2, float2) -> float2;
#foreign atan2 :: (float3, float3) -> float3;
#foreign atan2 :: (float4, float4) -> float4;
#foreign atan2 :: (float4x4, float4x4) -> float4x4;

#foreign sample :: (Texture2D, Sampler, float2) -> float4;

#foreign lerp :: (float, float, float) -> float;
#foreign lerp :: (float2, float2, float) -> float2;
#foreign lerp :: (float3, float3, float) -> float3;
#foreign lerp :: (float4, float4, float) -> float4;

#foreign fmod :: (float, float) -> float;
