mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-01 11:18:23 +03:00
Small refactoring of comparison operators
This commit is contained in:
+19
-19
@@ -848,28 +848,28 @@ struct auth_3d_id {
|
||||
void unload(render_context* rctx);
|
||||
};
|
||||
|
||||
inline bool operator >(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return left.id > right.id;
|
||||
}
|
||||
|
||||
inline bool operator <(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return left.id < right.id;
|
||||
}
|
||||
|
||||
inline bool operator >=(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return left.id >= right.id;
|
||||
}
|
||||
|
||||
inline bool operator <=(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return left.id <= right.id;
|
||||
}
|
||||
|
||||
inline bool operator ==(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
constexpr bool operator==(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return left.id == right.id;
|
||||
}
|
||||
|
||||
inline bool operator !=(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return left.id != right.id;
|
||||
constexpr bool operator!=(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
constexpr bool operator<(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return left.id < right.id;
|
||||
}
|
||||
|
||||
constexpr bool operator>(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return right < left;
|
||||
}
|
||||
|
||||
constexpr bool operator<=(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return !(right < left);
|
||||
}
|
||||
|
||||
constexpr bool operator>=(const auth_3d_id& left, const auth_3d_id& right) {
|
||||
return !(left < right);
|
||||
}
|
||||
|
||||
struct auth_3d {
|
||||
|
||||
+13
-16
@@ -5115,32 +5115,29 @@ pv_data_set_motion::pv_data_set_motion(uint32_t motion_id, std::pair<float_t, in
|
||||
this->frame_stage_index = frame_stage_index;
|
||||
}
|
||||
|
||||
inline bool operator>(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return left.motion_id > right.motion_id || (!(right.motion_id > left.motion_id)
|
||||
&& left.frame_stage_index > right.frame_stage_index);
|
||||
constexpr bool operator==(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return left.motion_id == right.motion_id && left.frame_stage_index == right.frame_stage_index;
|
||||
}
|
||||
|
||||
inline bool operator<(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
constexpr bool operator!=(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
constexpr bool operator<(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return left.motion_id < right.motion_id || (!(right.motion_id < left.motion_id)
|
||||
&& left.frame_stage_index < right.frame_stage_index);
|
||||
}
|
||||
|
||||
inline bool operator>=(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return left.motion_id >= right.motion_id || (!(right.motion_id >= left.motion_id)
|
||||
&& left.frame_stage_index >= right.frame_stage_index);
|
||||
constexpr bool operator>(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return right < left;
|
||||
}
|
||||
|
||||
inline bool operator<=(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return left.motion_id <= right.motion_id || (!(right.motion_id <= left.motion_id)
|
||||
&& left.frame_stage_index <= right.frame_stage_index);
|
||||
constexpr bool operator<=(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return !(right < left);
|
||||
}
|
||||
|
||||
inline bool operator ==(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return left.motion_id == right.motion_id && left.frame_stage_index == right.frame_stage_index;
|
||||
}
|
||||
|
||||
inline bool operator !=(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return left.motion_id != right.motion_id || left.frame_stage_index != right.frame_stage_index;
|
||||
constexpr bool operator>=(const pv_data_set_motion& left, const pv_data_set_motion& right) {
|
||||
return !(left < right);
|
||||
}
|
||||
|
||||
osage_init_data::osage_init_data() : rob_chr() {
|
||||
|
||||
@@ -65,15 +65,15 @@ struct skin_param_key {
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator==(const skin_param_key& left, const skin_param_key& right) {
|
||||
constexpr bool operator==(const skin_param_key& left, const skin_param_key& right) {
|
||||
return left.obj_info == right.obj_info && left.motion_id == right.motion_id && left.frame == right.frame;
|
||||
}
|
||||
|
||||
inline bool operator!=(const skin_param_key& left, const skin_param_key& right) {
|
||||
constexpr bool operator!=(const skin_param_key& left, const skin_param_key& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
inline bool operator<(const skin_param_key& left, const skin_param_key& right) {
|
||||
constexpr bool operator<(const skin_param_key& left, const skin_param_key& right) {
|
||||
if (left.obj_info != right.obj_info)
|
||||
return left.obj_info < right.obj_info;
|
||||
else if (left.motion_id != right.motion_id)
|
||||
@@ -84,15 +84,15 @@ inline bool operator<(const skin_param_key& left, const skin_param_key& right) {
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool operator>(const skin_param_key& left, const skin_param_key& right) {
|
||||
constexpr bool operator>(const skin_param_key& left, const skin_param_key& right) {
|
||||
return right < left;
|
||||
}
|
||||
|
||||
inline bool operator<=(const skin_param_key& left, const skin_param_key& right) {
|
||||
constexpr bool operator<=(const skin_param_key& left, const skin_param_key& right) {
|
||||
return !(right < left);
|
||||
}
|
||||
|
||||
inline bool operator>=(const skin_param_key& left, const skin_param_key& right) {
|
||||
constexpr bool operator>=(const skin_param_key& left, const skin_param_key& right) {
|
||||
return !(left < right);
|
||||
}
|
||||
|
||||
|
||||
+19
-19
@@ -31,28 +31,28 @@ struct texture_id {
|
||||
|
||||
};
|
||||
|
||||
inline bool operator >(const texture_id& left, const texture_id& right) {
|
||||
return (((uint64_t)left.id << 32) | left.index) > (((uint64_t)right.id << 32) | right.index);
|
||||
}
|
||||
|
||||
inline bool operator <(const texture_id& left, const texture_id& right) {
|
||||
return (((uint64_t)left.id << 32) | left.index) < (((uint64_t)right.id << 32) | right.index);
|
||||
}
|
||||
|
||||
inline bool operator >=(const texture_id& left, const texture_id& right) {
|
||||
return (((uint64_t)left.id << 32) | left.index) >= (((uint64_t)right.id << 32) | right.index);
|
||||
}
|
||||
|
||||
inline bool operator <=(const texture_id& left, const texture_id& right) {
|
||||
return (((uint64_t)left.id << 32) | left.index) <= (((uint64_t)right.id << 32) | right.index);
|
||||
}
|
||||
|
||||
inline bool operator ==(const texture_id& left, const texture_id& right) {
|
||||
constexpr bool operator==(const texture_id& left, const texture_id& right) {
|
||||
return (((uint64_t)left.id << 32) | left.index) == (((uint64_t)right.id << 32) | right.index);
|
||||
}
|
||||
|
||||
inline bool operator !=(const texture_id& left, const texture_id& right) {
|
||||
return (((uint64_t)left.id << 32) | left.index) != (((uint64_t)right.id << 32) | right.index);
|
||||
constexpr bool operator!=(const texture_id& left, const texture_id& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
constexpr bool operator<(const texture_id& left, const texture_id& right) {
|
||||
return (((uint64_t)left.id << 32) | left.index) < (((uint64_t)right.id << 32) | right.index);
|
||||
}
|
||||
|
||||
constexpr bool operator>(const texture_id& left, const texture_id& right) {
|
||||
return right < left;
|
||||
}
|
||||
|
||||
constexpr bool operator<=(const texture_id& left, const texture_id& right) {
|
||||
return !(right < left);
|
||||
}
|
||||
|
||||
constexpr bool operator>=(const texture_id& left, const texture_id& right) {
|
||||
return !(left < right);
|
||||
}
|
||||
|
||||
struct texture {
|
||||
|
||||
+19
-19
@@ -34,28 +34,28 @@ struct aet_info {
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator >(const aet_info& left, const aet_info& right) {
|
||||
return *(uint32_t*)&left > *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator <(const aet_info& left, const aet_info& right) {
|
||||
return *(uint32_t*)&left < *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator >=(const aet_info& left, const aet_info& right) {
|
||||
return *(uint32_t*)&left >= *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator <=(const aet_info& left, const aet_info& right) {
|
||||
return *(uint32_t*)&left <= *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator ==(const aet_info& left, const aet_info& right) {
|
||||
constexpr bool operator==(const aet_info& left, const aet_info& right) {
|
||||
return *(uint32_t*)&left == *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator !=(const aet_info& left, const aet_info& right) {
|
||||
return *(uint32_t*)&left != *(uint32_t*)&right;
|
||||
constexpr bool operator!=(const aet_info& left, const aet_info& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
constexpr bool operator<(const aet_info& left, const aet_info& right) {
|
||||
return *(uint32_t*)&left < *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
constexpr bool operator>(const aet_info& left, const aet_info& right) {
|
||||
return right < left;
|
||||
}
|
||||
|
||||
constexpr bool operator<=(const aet_info& left, const aet_info& right) {
|
||||
return !(right < left);
|
||||
}
|
||||
|
||||
constexpr bool operator>=(const aet_info& left, const aet_info& right) {
|
||||
return !(left < right);
|
||||
}
|
||||
|
||||
struct aet_db_aet_file {
|
||||
|
||||
@@ -46,28 +46,28 @@ struct object_info {
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator >(const object_info& left, const object_info& right) {
|
||||
return *(uint64_t*)&left > *(uint64_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator <(const object_info& left, const object_info& right) {
|
||||
return *(uint64_t*)&left < *(uint64_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator >=(const object_info& left, const object_info& right) {
|
||||
return *(uint64_t*)&left >= *(uint64_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator <=(const object_info& left, const object_info& right) {
|
||||
return *(uint64_t*)&left <= *(uint64_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator ==(const object_info& left, const object_info& right) {
|
||||
constexpr bool operator==(const object_info& left, const object_info& right) {
|
||||
return *(uint64_t*)&left == *(uint64_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator !=(const object_info& left, const object_info& right) {
|
||||
return *(uint64_t*)&left != *(uint64_t*)&right;
|
||||
constexpr bool operator!=(const object_info& left, const object_info& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
constexpr bool operator<(const object_info& left, const object_info& right) {
|
||||
return *(uint64_t*)&left < *(uint64_t*)&right;
|
||||
}
|
||||
|
||||
constexpr bool operator>(const object_info& left, const object_info& right) {
|
||||
return right < left;
|
||||
}
|
||||
|
||||
constexpr bool operator<=(const object_info& left, const object_info& right) {
|
||||
return !(right < left);
|
||||
}
|
||||
|
||||
constexpr bool operator>=(const object_info& left, const object_info& right) {
|
||||
return !(left < right);
|
||||
}
|
||||
|
||||
struct object_info_data_file {
|
||||
|
||||
@@ -34,28 +34,28 @@ struct spr_info {
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator >(const spr_info& left, const spr_info& right) {
|
||||
return *(uint32_t*)&left > *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator <(const spr_info& left, const spr_info& right) {
|
||||
return *(uint32_t*)&left < *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator >=(const spr_info& left, const spr_info& right) {
|
||||
return *(uint32_t*)&left >= *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator <=(const spr_info& left, const spr_info& right) {
|
||||
return *(uint32_t*)&left <= *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator ==(const spr_info& left, const spr_info& right) {
|
||||
constexpr bool operator==(const spr_info& left, const spr_info& right) {
|
||||
return *(uint32_t*)&left == *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
inline bool operator !=(const spr_info& left, const spr_info& right) {
|
||||
return *(uint32_t*)&left != *(uint32_t*)&right;
|
||||
constexpr bool operator!=(const spr_info& left, const spr_info& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
constexpr bool operator<(const spr_info& left, const spr_info& right) {
|
||||
return *(uint32_t*)&left < *(uint32_t*)&right;
|
||||
}
|
||||
|
||||
constexpr bool operator>(const spr_info& left, const spr_info& right) {
|
||||
return right < left;
|
||||
}
|
||||
|
||||
constexpr bool operator<=(const spr_info& left, const spr_info& right) {
|
||||
return !(right < left);
|
||||
}
|
||||
|
||||
constexpr bool operator>=(const spr_info& left, const spr_info& right) {
|
||||
return !(left < right);
|
||||
}
|
||||
|
||||
struct spr_db_spr_file {
|
||||
|
||||
+19
-19
@@ -313,28 +313,28 @@ struct string_hash {
|
||||
}
|
||||
};
|
||||
|
||||
inline bool operator >(const string_hash& left, const string_hash& right) {
|
||||
return left.str.compare(right.str) > 0;
|
||||
}
|
||||
|
||||
inline bool operator <(const string_hash& left, const string_hash& right) {
|
||||
return left.str.compare(right.str) < 0;
|
||||
}
|
||||
|
||||
inline bool operator >=(const string_hash& left, const string_hash& right) {
|
||||
return left.str.compare(right.str) >= 0;
|
||||
}
|
||||
|
||||
inline bool operator <=(const string_hash& left, const string_hash& right) {
|
||||
return left.str.compare(right.str) <= 0;
|
||||
}
|
||||
|
||||
inline bool operator ==(const string_hash& left, const string_hash& right) {
|
||||
inline bool operator==(const string_hash& left, const string_hash& right) {
|
||||
return !left.str.compare(right.str);
|
||||
}
|
||||
|
||||
inline bool operator !=(const string_hash& left, const string_hash& right) {
|
||||
return !!left.str.compare(right.str);
|
||||
inline bool operator!=(const string_hash& left, const string_hash& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
inline bool operator<(const string_hash& left, const string_hash& right) {
|
||||
return left.str.compare(right.str) < 0;
|
||||
}
|
||||
|
||||
inline bool operator>(const string_hash& left, const string_hash& right) {
|
||||
return right < left;
|
||||
}
|
||||
|
||||
inline bool operator<=(const string_hash& left, const string_hash& right) {
|
||||
return !(right < left);
|
||||
}
|
||||
|
||||
inline bool operator>=(const string_hash& left, const string_hash& right) {
|
||||
return !(left < right);
|
||||
}
|
||||
|
||||
struct adler_buf {
|
||||
|
||||
@@ -266,13 +266,13 @@ namespace prj {
|
||||
};
|
||||
|
||||
template<class T, class U>
|
||||
bool operator==(const shared_ptr<T>& left,
|
||||
constexpr bool operator==(const shared_ptr<T>& left,
|
||||
const shared_ptr<U>& right) {
|
||||
return left.get() == right.get();
|
||||
}
|
||||
|
||||
template<class T, class U>
|
||||
bool operator!=(const shared_ptr<T>& left,
|
||||
constexpr bool operator!=(const shared_ptr<T>& left,
|
||||
const shared_ptr<U>& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
+21
-13
@@ -111,58 +111,66 @@ inline quat::quat(float_t m00, float_t m01, float_t m02, float_t m10,
|
||||
}
|
||||
}
|
||||
|
||||
inline quat operator +(const quat& left, const quat& right) {
|
||||
inline quat operator+(const quat& left, const quat& right) {
|
||||
return quat::store_xmm(_mm_add_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator +(const quat& left, const float_t right) {
|
||||
inline quat operator+(const quat& left, const float_t right) {
|
||||
return quat::store_xmm(_mm_add_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator -(const quat& left, const quat& right) {
|
||||
inline quat operator-(const quat& left, const quat& right) {
|
||||
return quat::store_xmm(_mm_sub_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator -(const quat& left, const float_t right) {
|
||||
inline quat operator-(const quat& left, const float_t right) {
|
||||
return quat::store_xmm(_mm_sub_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator *(const quat& left, const quat& right) {
|
||||
inline quat operator*(const quat& left, const quat& right) {
|
||||
return quat::store_xmm(_mm_mul_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator *(const quat& left, const float_t right) {
|
||||
inline quat operator*(const quat& left, const float_t right) {
|
||||
return quat::store_xmm(_mm_mul_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator /(const quat& left, const quat& right) {
|
||||
inline quat operator/(const quat& left, const quat& right) {
|
||||
return quat::store_xmm(_mm_div_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator /(const quat& left, const float_t right) {
|
||||
inline quat operator/(const quat& left, const float_t right) {
|
||||
return quat::store_xmm(_mm_div_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator &(const quat& left, const quat& right) {
|
||||
inline quat operator&(const quat& left, const quat& right) {
|
||||
return quat::store_xmm(_mm_and_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator &(const quat& left, const float_t right) {
|
||||
inline quat operator&(const quat& left, const float_t right) {
|
||||
return quat::store_xmm(_mm_and_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator ^(const quat& left, const quat& right) {
|
||||
inline quat operator^(const quat& left, const quat& right) {
|
||||
return quat::store_xmm(_mm_xor_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator ^(const quat& left, const float_t right) {
|
||||
inline quat operator^(const quat& left, const float_t right) {
|
||||
return quat::store_xmm(_mm_xor_ps(quat::load_xmm(left), quat::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline quat operator -(const quat& left) {
|
||||
inline quat operator-(const quat& left) {
|
||||
return quat::store_xmm(_mm_xor_ps(quat::load_xmm(left), vec4_neg));
|
||||
}
|
||||
|
||||
inline bool operator==(const quat& left, const quat& right) {
|
||||
return !memcmp(&left, &right, sizeof(quat));
|
||||
}
|
||||
|
||||
inline bool operator!=(const quat& left, const quat& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
inline __m128 quat::load_xmm(const float_t data) {
|
||||
__m128 _data = _mm_load_ss(&data);
|
||||
return _mm_shuffle_ps(_data, _data, 0);
|
||||
|
||||
+154
-154
@@ -542,136 +542,136 @@ inline vec2 vec2::store_xmm(const __m128&& data) {
|
||||
return _data;
|
||||
}
|
||||
|
||||
inline vec2 operator +(const vec2& left, const vec2& right) {
|
||||
inline vec2 operator+(const vec2& left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_add_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator +(const vec2& left, const float_t right) {
|
||||
inline vec2 operator+(const vec2& left, const float_t right) {
|
||||
return vec2::store_xmm(_mm_add_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator +(const float_t left, const vec2& right) {
|
||||
inline vec2 operator+(const float_t left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_add_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator +=(vec2& left, const vec2& right) {
|
||||
inline void operator+=(vec2& left, const vec2& right) {
|
||||
left = vec2::store_xmm(_mm_add_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator +=(vec2& left, const float_t right) {
|
||||
inline void operator+=(vec2& left, const float_t right) {
|
||||
left = vec2::store_xmm(_mm_add_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator -(const vec2& left, const vec2& right) {
|
||||
inline vec2 operator-(const vec2& left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_sub_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator -(const vec2& left, const float_t right) {
|
||||
inline vec2 operator-(const vec2& left, const float_t right) {
|
||||
return vec2::store_xmm(_mm_sub_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator -(const float_t left, const vec2& right) {
|
||||
inline vec2 operator-(const float_t left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_sub_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator -=(vec2& left, const vec2& right) {
|
||||
inline void operator-=(vec2& left, const vec2& right) {
|
||||
left = vec2::store_xmm(_mm_sub_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator -=(vec2& left, const float_t right) {
|
||||
inline void operator-=(vec2& left, const float_t right) {
|
||||
left = vec2::store_xmm(_mm_sub_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator *(const vec2& left, const vec2& right) {
|
||||
inline vec2 operator*(const vec2& left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_mul_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator *(const vec2& left, const float_t right) {
|
||||
inline vec2 operator*(const vec2& left, const float_t right) {
|
||||
return vec2::store_xmm(_mm_mul_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator *(const float_t left, const vec2& right) {
|
||||
inline vec2 operator*(const float_t left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_mul_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator *=(vec2& left, const vec2& right) {
|
||||
inline void operator*=(vec2& left, const vec2& right) {
|
||||
left = vec2::store_xmm(_mm_mul_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator *=(vec2& left, const float_t right) {
|
||||
inline void operator*=(vec2& left, const float_t right) {
|
||||
left = vec2::store_xmm(_mm_mul_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator /(const vec2& left, const vec2& right) {
|
||||
inline vec2 operator/(const vec2& left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_div_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator /(const vec2& left, const float_t right) {
|
||||
inline vec2 operator/(const vec2& left, const float_t right) {
|
||||
return vec2::store_xmm(_mm_div_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator /(const float_t left, const vec2& right) {
|
||||
inline vec2 operator/(const float_t left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_div_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator /=(vec2& left, const vec2& right) {
|
||||
inline void operator/=(vec2& left, const vec2& right) {
|
||||
left = vec2::store_xmm(_mm_div_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator /=(vec2& left, const float_t right) {
|
||||
inline void operator/=(vec2& left, const float_t right) {
|
||||
left = vec2::store_xmm(_mm_div_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator &(const vec2& left, const vec2& right) {
|
||||
inline vec2 operator&(const vec2& left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_and_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator &(const vec2& left, const float_t right) {
|
||||
inline vec2 operator&(const vec2& left, const float_t right) {
|
||||
return vec2::store_xmm(_mm_and_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator &(const float_t left, const vec2& right) {
|
||||
inline vec2 operator&(const float_t left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_and_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator &=(vec2& left, const vec2& right) {
|
||||
inline void operator&=(vec2& left, const vec2& right) {
|
||||
left = vec2::store_xmm(_mm_and_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator &=(vec2& left, const float_t right) {
|
||||
inline void operator&=(vec2& left, const float_t right) {
|
||||
left = vec2::store_xmm(_mm_and_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator ^(const vec2& left, const vec2& right) {
|
||||
inline vec2 operator^(const vec2& left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_xor_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator ^(const vec2& left, const float_t right) {
|
||||
inline vec2 operator^(const vec2& left, const float_t right) {
|
||||
return vec2::store_xmm(_mm_xor_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator ^(const float_t left, const vec2& right) {
|
||||
inline vec2 operator^(const float_t left, const vec2& right) {
|
||||
return vec2::store_xmm(_mm_xor_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator ^=(vec2& left, const vec2& right) {
|
||||
inline void operator^=(vec2& left, const vec2& right) {
|
||||
left = vec2::store_xmm(_mm_xor_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator ^=(vec2& left, const float_t right) {
|
||||
inline void operator^=(vec2& left, const float_t right) {
|
||||
left = vec2::store_xmm(_mm_xor_ps(vec2::load_xmm(left), vec2::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2 operator -(const vec2& left) {
|
||||
inline vec2 operator-(const vec2& left) {
|
||||
return vec2::store_xmm(_mm_xor_ps(vec2::load_xmm(left), vec2_neg));
|
||||
}
|
||||
|
||||
inline bool operator ==(const vec2& left, const vec2& right) {
|
||||
inline bool operator==(const vec2& left, const vec2& right) {
|
||||
return !memcmp(&left, &right, sizeof(vec2));
|
||||
}
|
||||
|
||||
inline bool operator !=(const vec2& left, const vec2& right) {
|
||||
return !!memcmp(&left, &right, sizeof(vec2));
|
||||
inline bool operator!=(const vec2& left, const vec2& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
inline float_t vec2::angle(const vec2& left, const vec2& right) {
|
||||
@@ -832,136 +832,136 @@ inline vec3::vec3(float_t x, float_t y, float_t z) : x(x), y(y), z(z) {
|
||||
|
||||
}
|
||||
|
||||
inline vec3 operator +(const vec3& left, const vec3& right) {
|
||||
inline vec3 operator+(const vec3& left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_add_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator +(const vec3& left, const float_t right) {
|
||||
inline vec3 operator+(const vec3& left, const float_t right) {
|
||||
return vec3::store_xmm(_mm_add_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator +(const float_t left, const vec3& right) {
|
||||
inline vec3 operator+(const float_t left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_add_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator +=(vec3& left, const vec3& right) {
|
||||
inline void operator+=(vec3& left, const vec3& right) {
|
||||
left = vec3::store_xmm(_mm_add_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator +=(vec3& left, const float_t right) {
|
||||
inline void operator+=(vec3& left, const float_t right) {
|
||||
left = vec3::store_xmm(_mm_add_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator -(const vec3& left, const vec3& right) {
|
||||
inline vec3 operator-(const vec3& left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_sub_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator -(const vec3& left, const float_t right) {
|
||||
inline vec3 operator-(const vec3& left, const float_t right) {
|
||||
return vec3::store_xmm(_mm_sub_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator -(const float_t left, const vec3& right) {
|
||||
inline vec3 operator-(const float_t left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_sub_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator -=(vec3& left, const vec3& right) {
|
||||
inline void operator-=(vec3& left, const vec3& right) {
|
||||
left = vec3::store_xmm(_mm_sub_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator -=(vec3& left, const float_t right) {
|
||||
inline void operator-=(vec3& left, const float_t right) {
|
||||
left = vec3::store_xmm(_mm_sub_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator *(const vec3& left, const vec3& right) {
|
||||
inline vec3 operator*(const vec3& left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_mul_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator *(const vec3& left, const float_t right) {
|
||||
inline vec3 operator*(const vec3& left, const float_t right) {
|
||||
return vec3::store_xmm(_mm_mul_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator *(const float_t left, const vec3& right) {
|
||||
inline vec3 operator*(const float_t left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_mul_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator *=(vec3& left, const vec3& right) {
|
||||
inline void operator*=(vec3& left, const vec3& right) {
|
||||
left = vec3::store_xmm(_mm_mul_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator *=(vec3& left, const float_t right) {
|
||||
inline void operator*=(vec3& left, const float_t right) {
|
||||
left = vec3::store_xmm(_mm_mul_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator /(const vec3& left, const vec3& right) {
|
||||
inline vec3 operator/(const vec3& left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_div_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator /(const vec3& left, const float_t right) {
|
||||
inline vec3 operator/(const vec3& left, const float_t right) {
|
||||
return vec3::store_xmm(_mm_div_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator /(const float_t left, const vec3& right) {
|
||||
inline vec3 operator/(const float_t left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_div_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator /=(vec3& left, const vec3& right) {
|
||||
inline void operator/=(vec3& left, const vec3& right) {
|
||||
left = vec3::store_xmm(_mm_div_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator /=(vec3& left, const float_t right) {
|
||||
inline void operator/=(vec3& left, const float_t right) {
|
||||
left = vec3::store_xmm(_mm_div_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator &(const vec3& left, const vec3& right) {
|
||||
inline vec3 operator&(const vec3& left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_and_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator &(const vec3& left, const float_t right) {
|
||||
inline vec3 operator&(const vec3& left, const float_t right) {
|
||||
return vec3::store_xmm(_mm_and_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator &(const float_t left, const vec3& right) {
|
||||
inline vec3 operator&(const float_t left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_and_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator &=(vec3& left, const vec3& right) {
|
||||
inline void operator&=(vec3& left, const vec3& right) {
|
||||
left = vec3::store_xmm(_mm_and_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator &=(vec3& left, const float_t right) {
|
||||
inline void operator&=(vec3& left, const float_t right) {
|
||||
left = vec3::store_xmm(_mm_and_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator ^(const vec3& left, const vec3& right) {
|
||||
inline vec3 operator^(const vec3& left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_xor_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator ^(const vec3& left, const float_t right) {
|
||||
inline vec3 operator^(const vec3& left, const float_t right) {
|
||||
return vec3::store_xmm(_mm_xor_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator ^(const float_t left, const vec3& right) {
|
||||
inline vec3 operator^(const float_t left, const vec3& right) {
|
||||
return vec3::store_xmm(_mm_xor_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator ^=(vec3& left, const vec3& right) {
|
||||
inline void operator^=(vec3& left, const vec3& right) {
|
||||
left = vec3::store_xmm(_mm_xor_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator ^=(vec3& left, const float_t right) {
|
||||
inline void operator^=(vec3& left, const float_t right) {
|
||||
left = vec3::store_xmm(_mm_xor_ps(vec3::load_xmm(left), vec3::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3 operator -(const vec3& left) {
|
||||
inline vec3 operator-(const vec3& left) {
|
||||
return vec3::store_xmm(_mm_xor_ps(vec3::load_xmm(left), vec3_neg));
|
||||
}
|
||||
|
||||
inline bool operator ==(const vec3& left, const vec3& right) {
|
||||
inline bool operator==(const vec3& left, const vec3& right) {
|
||||
return !memcmp(&left, &right, sizeof(vec3));
|
||||
}
|
||||
|
||||
inline bool operator !=(const vec3& left, const vec3& right) {
|
||||
return !!memcmp(&left, &right, sizeof(vec3));
|
||||
inline bool operator!=(const vec3& left, const vec3& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
inline __m128 vec3::load_xmm(const float_t data) {
|
||||
@@ -1177,136 +1177,136 @@ inline vec4::vec4(float_t x, float_t y, float_t z, float_t w) : x(x), y(y), z(z)
|
||||
|
||||
}
|
||||
|
||||
inline vec4 operator +(const vec4& left, const vec4& right) {
|
||||
inline vec4 operator+(const vec4& left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_add_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator +(const vec4& left, const float_t right) {
|
||||
inline vec4 operator+(const vec4& left, const float_t right) {
|
||||
return vec4::store_xmm(_mm_add_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator +(const float_t left, const vec4& right) {
|
||||
inline vec4 operator+(const float_t left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_add_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator +=(vec4& left, const vec4& right) {
|
||||
inline void operator+=(vec4& left, const vec4& right) {
|
||||
left = vec4::store_xmm(_mm_add_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator +=(vec4& left, const float_t right) {
|
||||
inline void operator+=(vec4& left, const float_t right) {
|
||||
left = vec4::store_xmm(_mm_add_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator -(const vec4& left, const vec4& right) {
|
||||
inline vec4 operator-(const vec4& left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_sub_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator -(const vec4& left, const float_t right) {
|
||||
inline vec4 operator-(const vec4& left, const float_t right) {
|
||||
return vec4::store_xmm(_mm_sub_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator -(const float_t left, const vec4& right) {
|
||||
inline vec4 operator-(const float_t left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_sub_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator -=(vec4& left, const vec4& right) {
|
||||
inline void operator-=(vec4& left, const vec4& right) {
|
||||
left = vec4::store_xmm(_mm_sub_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator -=(vec4& left, const float_t right) {
|
||||
inline void operator-=(vec4& left, const float_t right) {
|
||||
left = vec4::store_xmm(_mm_sub_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator *(const vec4& left, const vec4& right) {
|
||||
inline vec4 operator*(const vec4& left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_mul_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator *(const vec4& left, const float_t right) {
|
||||
inline vec4 operator*(const vec4& left, const float_t right) {
|
||||
return vec4::store_xmm(_mm_mul_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator *(const float_t left, const vec4& right) {
|
||||
inline vec4 operator*(const float_t left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_mul_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator *=(vec4& left, const vec4& right) {
|
||||
inline void operator*=(vec4& left, const vec4& right) {
|
||||
left = vec4::store_xmm(_mm_mul_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator *=(vec4& left, const float_t right) {
|
||||
inline void operator*=(vec4& left, const float_t right) {
|
||||
left = vec4::store_xmm(_mm_mul_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator /(const vec4& left, const vec4& right) {
|
||||
inline vec4 operator/(const vec4& left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_div_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator /(const vec4& left, const float_t right) {
|
||||
inline vec4 operator/(const vec4& left, const float_t right) {
|
||||
return vec4::store_xmm(_mm_div_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator /(const float_t left, const vec4& right) {
|
||||
inline vec4 operator/(const float_t left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_div_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator /=(vec4& left, const vec4& right) {
|
||||
inline void operator/=(vec4& left, const vec4& right) {
|
||||
left = vec4::store_xmm(_mm_div_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator /=(vec4& left, const float_t right) {
|
||||
inline void operator/=(vec4& left, const float_t right) {
|
||||
left = vec4::store_xmm(_mm_div_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator &(const vec4& left, const vec4& right) {
|
||||
inline vec4 operator&(const vec4& left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_and_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator &(const vec4& left, const float_t right) {
|
||||
inline vec4 operator&(const vec4& left, const float_t right) {
|
||||
return vec4::store_xmm(_mm_and_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator &(const float_t left, const vec4& right) {
|
||||
inline vec4 operator&(const float_t left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_and_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator &=(vec4& left, const vec4& right) {
|
||||
inline void operator&=(vec4& left, const vec4& right) {
|
||||
left = vec4::store_xmm(_mm_and_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator &=(vec4& left, const float_t right) {
|
||||
inline void operator&=(vec4& left, const float_t right) {
|
||||
left = vec4::store_xmm(_mm_and_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator ^(const vec4& left, const vec4& right) {
|
||||
inline vec4 operator^(const vec4& left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_xor_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator ^(const vec4& left, const float_t right) {
|
||||
inline vec4 operator^(const vec4& left, const float_t right) {
|
||||
return vec4::store_xmm(_mm_xor_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator ^(const float_t left, const vec4& right) {
|
||||
inline vec4 operator^(const float_t left, const vec4& right) {
|
||||
return vec4::store_xmm(_mm_xor_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator ^=(vec4& left, const vec4& right) {
|
||||
inline void operator^=(vec4& left, const vec4& right) {
|
||||
left = vec4::store_xmm(_mm_xor_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator ^=(vec4& left, const float_t right) {
|
||||
inline void operator^=(vec4& left, const float_t right) {
|
||||
left = vec4::store_xmm(_mm_xor_ps(vec4::load_xmm(left), vec4::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4 operator -(const vec4& left) {
|
||||
inline vec4 operator-(const vec4& left) {
|
||||
return vec4::store_xmm(_mm_xor_ps(vec4::load_xmm(left), vec4_neg));
|
||||
}
|
||||
|
||||
inline bool operator ==(const vec4& left, const vec4& right) {
|
||||
inline bool operator==(const vec4& left, const vec4& right) {
|
||||
return !memcmp(&left, &right, sizeof(vec4));
|
||||
}
|
||||
|
||||
inline bool operator !=(const vec4& left, const vec4& right) {
|
||||
return !!memcmp(&left, &right, sizeof(vec4));
|
||||
inline bool operator!=(const vec4& left, const vec4& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
inline __m128 vec4::load_xmm(const float_t data) {
|
||||
@@ -1499,27 +1499,27 @@ inline vec2i::vec2i(int32_t x, int32_t y) : x(x), y(y) {
|
||||
|
||||
}
|
||||
|
||||
inline vec2i operator +(const vec2i& left, const vec2i& right) {
|
||||
inline vec2i operator+(const vec2i& left, const vec2i& right) {
|
||||
return vec2i::store_xmm(_mm_add_epi32(vec2i::load_xmm(left), vec2i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2i operator +(const vec2i& left, const int32_t right) {
|
||||
inline vec2i operator+(const vec2i& left, const int32_t right) {
|
||||
return vec2i::store_xmm(_mm_add_epi32(vec2i::load_xmm(left), vec2i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2i operator +(const int32_t left, const vec2i& right) {
|
||||
inline vec2i operator+(const int32_t left, const vec2i& right) {
|
||||
return vec2i::store_xmm(_mm_add_epi32(vec2i::load_xmm(left), vec2i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2i operator -(const vec2i& left, const vec2i& right) {
|
||||
inline vec2i operator-(const vec2i& left, const vec2i& right) {
|
||||
return vec2i::store_xmm(_mm_sub_epi32(vec2i::load_xmm(left), vec2i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2i operator -(const vec2i& left, const int32_t right) {
|
||||
inline vec2i operator-(const vec2i& left, const int32_t right) {
|
||||
return vec2i::store_xmm(_mm_sub_epi32(vec2i::load_xmm(left), vec2i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2i operator -(const int32_t left, const vec2i& right) {
|
||||
inline vec2i operator-(const int32_t left, const vec2i& right) {
|
||||
return vec2i::store_xmm(_mm_sub_epi32(vec2i::load_xmm(left), vec2i::load_xmm(right)));
|
||||
}
|
||||
|
||||
@@ -1578,27 +1578,27 @@ inline vec3i::vec3i(int32_t x, int32_t y, int32_t z) : x(x), y(y), z(z) {
|
||||
|
||||
}
|
||||
|
||||
inline vec3i operator +(const vec3i& left, const vec3i& right) {
|
||||
inline vec3i operator+(const vec3i& left, const vec3i& right) {
|
||||
return vec3i::store_xmm(_mm_add_epi32(vec3i::load_xmm(left), vec3i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3i operator +(const vec3i& left, const int32_t right) {
|
||||
inline vec3i operator+(const vec3i& left, const int32_t right) {
|
||||
return vec3i::store_xmm(_mm_add_epi32(vec3i::load_xmm(left), vec3i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3i operator +(const int32_t left, const vec3i& right) {
|
||||
inline vec3i operator+(const int32_t left, const vec3i& right) {
|
||||
return vec3i::store_xmm(_mm_add_epi32(vec3i::load_xmm(left), vec3i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3i operator -(const vec3i& left, const vec3i& right) {
|
||||
inline vec3i operator-(const vec3i& left, const vec3i& right) {
|
||||
return vec3i::store_xmm(_mm_sub_epi32(vec3i::load_xmm(left), vec3i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3i operator -(const vec3i& left, const int32_t right) {
|
||||
inline vec3i operator-(const vec3i& left, const int32_t right) {
|
||||
return vec3i::store_xmm(_mm_sub_epi32(vec3i::load_xmm(left), vec3i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec3i operator -(const int32_t left, const vec3i& right) {
|
||||
inline vec3i operator-(const int32_t left, const vec3i& right) {
|
||||
return vec3i::store_xmm(_mm_sub_epi32(vec3i::load_xmm(left), vec3i::load_xmm(right)));
|
||||
}
|
||||
|
||||
@@ -1659,27 +1659,27 @@ inline vec4i::vec4i(int32_t x, int32_t y, int32_t z, int32_t w) : x(x), y(y), z(
|
||||
|
||||
}
|
||||
|
||||
inline vec4i operator +(const vec4i& left, const vec4i& right) {
|
||||
inline vec4i operator+(const vec4i& left, const vec4i& right) {
|
||||
return vec4i::store_xmm(_mm_add_epi32(vec4i::load_xmm(left), vec4i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4i operator +(const vec4i& left, const int32_t right) {
|
||||
inline vec4i operator+(const vec4i& left, const int32_t right) {
|
||||
return vec4i::store_xmm(_mm_add_epi32(vec4i::load_xmm(left), vec4i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4i operator +(const int32_t left, const vec4i& right) {
|
||||
inline vec4i operator+(const int32_t left, const vec4i& right) {
|
||||
return vec4i::store_xmm(_mm_add_epi32(vec4i::load_xmm(left), vec4i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4i operator -(const vec4i& left, const vec4i& right) {
|
||||
inline vec4i operator-(const vec4i& left, const vec4i& right) {
|
||||
return vec4i::store_xmm(_mm_sub_epi32(vec4i::load_xmm(left), vec4i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4i operator -(const vec4i& left, const int32_t right) {
|
||||
inline vec4i operator-(const vec4i& left, const int32_t right) {
|
||||
return vec4i::store_xmm(_mm_sub_epi32(vec4i::load_xmm(left), vec4i::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec4i operator -(const int32_t left, const vec4i& right) {
|
||||
inline vec4i operator-(const int32_t left, const vec4i& right) {
|
||||
return vec4i::store_xmm(_mm_sub_epi32(vec4i::load_xmm(left), vec4i::load_xmm(right)));
|
||||
}
|
||||
|
||||
@@ -1763,136 +1763,136 @@ inline vec2d vec2d::store_xmm(const __m128d&& data) {
|
||||
return _data;
|
||||
}
|
||||
|
||||
inline vec2d operator +(const vec2d& left, const vec2d& right) {
|
||||
inline vec2d operator+(const vec2d& left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_add_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator +(const vec2d& left, const double_t right) {
|
||||
inline vec2d operator+(const vec2d& left, const double_t right) {
|
||||
return vec2d::store_xmm(_mm_add_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator +(const double_t left, const vec2d& right) {
|
||||
inline vec2d operator+(const double_t left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_add_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator +=(vec2d& left, const vec2d& right) {
|
||||
inline void operator+=(vec2d& left, const vec2d& right) {
|
||||
left = vec2d::store_xmm(_mm_add_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator +=(vec2d& left, const double_t right) {
|
||||
inline void operator+=(vec2d& left, const double_t right) {
|
||||
left = vec2d::store_xmm(_mm_add_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator -(const vec2d& left, const vec2d& right) {
|
||||
inline vec2d operator-(const vec2d& left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_sub_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator -(const vec2d& left, const double_t right) {
|
||||
inline vec2d operator-(const vec2d& left, const double_t right) {
|
||||
return vec2d::store_xmm(_mm_sub_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator -(const double_t left, const vec2d& right) {
|
||||
inline vec2d operator-(const double_t left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_sub_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator -=(vec2d& left, const vec2d& right) {
|
||||
inline void operator-=(vec2d& left, const vec2d& right) {
|
||||
left = vec2d::store_xmm(_mm_sub_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator -=(vec2d& left, const double_t right) {
|
||||
inline void operator-=(vec2d& left, const double_t right) {
|
||||
left = vec2d::store_xmm(_mm_sub_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator *(const vec2d& left, const vec2d& right) {
|
||||
inline vec2d operator*(const vec2d& left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_mul_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator *(const vec2d& left, const double_t right) {
|
||||
inline vec2d operator*(const vec2d& left, const double_t right) {
|
||||
return vec2d::store_xmm(_mm_mul_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator *(const double_t left, const vec2d& right) {
|
||||
inline vec2d operator*(const double_t left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_mul_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator *=(vec2d& left, const vec2d& right) {
|
||||
inline void operator*=(vec2d& left, const vec2d& right) {
|
||||
left = vec2d::store_xmm(_mm_mul_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator *=(vec2d& left, const double_t right) {
|
||||
inline void operator*=(vec2d& left, const double_t right) {
|
||||
left = vec2d::store_xmm(_mm_mul_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator /(const vec2d& left, const vec2d& right) {
|
||||
inline vec2d operator/(const vec2d& left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_div_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator /(const vec2d& left, const double_t right) {
|
||||
inline vec2d operator/(const vec2d& left, const double_t right) {
|
||||
return vec2d::store_xmm(_mm_div_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator /(const double_t left, const vec2d& right) {
|
||||
inline vec2d operator/(const double_t left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_div_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator /=(vec2d& left, const vec2d& right) {
|
||||
inline void operator/=(vec2d& left, const vec2d& right) {
|
||||
left = vec2d::store_xmm(_mm_div_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator /=(vec2d& left, const double_t right) {
|
||||
inline void operator/=(vec2d& left, const double_t right) {
|
||||
left = vec2d::store_xmm(_mm_div_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator &(const vec2d& left, const vec2d& right) {
|
||||
inline vec2d operator&(const vec2d& left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_and_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator &(const vec2d& left, const double_t right) {
|
||||
inline vec2d operator&(const vec2d& left, const double_t right) {
|
||||
return vec2d::store_xmm(_mm_and_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator &(const double_t left, const vec2d& right) {
|
||||
inline vec2d operator&(const double_t left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_and_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator &=(vec2d& left, const vec2d& right) {
|
||||
inline void operator&=(vec2d& left, const vec2d& right) {
|
||||
left = vec2d::store_xmm(_mm_and_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator &=(vec2d& left, const double_t right) {
|
||||
inline void operator&=(vec2d& left, const double_t right) {
|
||||
left = vec2d::store_xmm(_mm_and_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator ^(const vec2d& left, const vec2d& right) {
|
||||
inline vec2d operator^(const vec2d& left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_xor_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator ^(const vec2d& left, const double_t right) {
|
||||
inline vec2d operator^(const vec2d& left, const double_t right) {
|
||||
return vec2d::store_xmm(_mm_xor_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator ^(const double_t left, const vec2d& right) {
|
||||
inline vec2d operator^(const double_t left, const vec2d& right) {
|
||||
return vec2d::store_xmm(_mm_xor_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator ^=(vec2d& left, const vec2d& right) {
|
||||
inline void operator^=(vec2d& left, const vec2d& right) {
|
||||
left = vec2d::store_xmm(_mm_xor_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline void operator ^=(vec2d& left, const double_t right) {
|
||||
inline void operator^=(vec2d& left, const double_t right) {
|
||||
left = vec2d::store_xmm(_mm_xor_pd(vec2d::load_xmm(left), vec2d::load_xmm(right)));
|
||||
}
|
||||
|
||||
inline vec2d operator -(const vec2d& left) {
|
||||
inline vec2d operator-(const vec2d& left) {
|
||||
return vec2d::store_xmm(_mm_xor_pd(vec2d::load_xmm(left), vec2d_neg));
|
||||
}
|
||||
|
||||
inline bool operator ==(const vec2d& left, const vec2d& right) {
|
||||
inline bool operator==(const vec2d& left, const vec2d& right) {
|
||||
return !memcmp(&left, &right, sizeof(vec2d));
|
||||
}
|
||||
|
||||
inline bool operator !=(const vec2d& left, const vec2d& right) {
|
||||
return !!memcmp(&left, &right, sizeof(vec2d));
|
||||
inline bool operator!=(const vec2d& left, const vec2d& right) {
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
inline double_t vec2d::angle(const vec2d& left, const vec2d& right) {
|
||||
|
||||
Reference in New Issue
Block a user