Techneck/code/source-c/utility/vector.c

53 lines
1.3 KiB
C
Raw Permalink Normal View History

#include <utility/math.h>
bool_t tc_vec4f_equ(tc_vec4f_s vector_1, tc_vec4f_s vector_2)
{
if(vector_1.x != vector_2.x) return FALSE;
if(vector_1.y != vector_2.y) return FALSE;
if(vector_1.z != vector_2.z) return FALSE;
if(vector_1.w != vector_2.w) return FALSE;
return TRUE;
}
bool_t tc_vec3f_equ(tc_vec3f_s vector_1, tc_vec3f_s vector_2)
{
if(vector_1.x != vector_2.x) return FALSE;
if(vector_1.y != vector_2.y) return FALSE;
if(vector_1.z != vector_2.z) return FALSE;
return TRUE;
}
bool_t tc_vec2f_equ(tc_vec2f_s vector_1, tc_vec2f_s vector_2)
{
if(vector_1.x != vector_2.x) return FALSE;
if(vector_1.y != vector_2.y) return FALSE;
return TRUE;
}
bool_t tc_vec4i_equ(tc_vec4i_s vector_1, tc_vec4i_s vector_2)
{
if(vector_1.x != vector_2.x) return FALSE;
if(vector_1.y != vector_2.y) return FALSE;
if(vector_1.z != vector_2.z) return FALSE;
if(vector_1.w != vector_2.w) return FALSE;
return TRUE;
}
bool_t tc_vec3i_equ(tc_vec3i_s vector_1, tc_vec3i_s vector_2)
{
if(vector_1.x != vector_2.x) return FALSE;
if(vector_1.y != vector_2.y) return FALSE;
if(vector_1.z != vector_2.z) return FALSE;
return TRUE;
}
bool_t tc_vec2i_equ(tc_vec2i_s vector_1, tc_vec2i_s vector_2)
{
if(vector_1.x != vector_2.x) return FALSE;
if(vector_1.y != vector_2.y) return FALSE;
return TRUE;
}