Core: Add constexpr constructors/operators to math structs
• Begin integrating `constexpr` on math tests; use `static_assert` where appropriate
This commit is contained in:
parent
9e6ee9c5c3
commit
ea62170dac
56 changed files with 1109 additions and 1159 deletions
|
|
@ -37,14 +37,6 @@ real_t AABB::get_volume() const {
|
|||
return size.x * size.y * size.z;
|
||||
}
|
||||
|
||||
bool AABB::operator==(const AABB &p_rval) const {
|
||||
return ((position == p_rval.position) && (size == p_rval.size));
|
||||
}
|
||||
|
||||
bool AABB::operator!=(const AABB &p_rval) const {
|
||||
return ((position != p_rval.position) || (size != p_rval.size));
|
||||
}
|
||||
|
||||
void AABB::merge_with(const AABB &p_aabb) {
|
||||
#ifdef MATH_CHECKS
|
||||
if (unlikely(size.x < 0 || size.y < 0 || size.z < 0 || p_aabb.size.x < 0 || p_aabb.size.y < 0 || p_aabb.size.z < 0)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue