mirror of
https://github.com/phoboslab/wipeout-rewrite
synced 2024-12-26 09:59:04 +01:00
Use float abs to calculate bounding radius
This commit is contained in:
parent
de13e2af82
commit
650572bdd2
1 changed files with 6 additions and 6 deletions
|
@ -76,14 +76,14 @@ Object *objects_load(char *name, texture_list_t tl) {
|
|||
object->vertices[i].z = get_i16(bytes, &p);
|
||||
p += 2; // padding
|
||||
|
||||
if (abs(object->vertices[i].x) > object->radius) {
|
||||
object->radius = abs(object->vertices[i].x);
|
||||
if (fabsf(object->vertices[i].x) > object->radius) {
|
||||
object->radius = fabsf(object->vertices[i].x);
|
||||
}
|
||||
if (abs(object->vertices[i].y) > object->radius) {
|
||||
object->radius = abs(object->vertices[i].y);
|
||||
if (fabsf(object->vertices[i].y) > object->radius) {
|
||||
object->radius = fabsf(object->vertices[i].y);
|
||||
}
|
||||
if (abs(object->vertices[i].z) > object->radius) {
|
||||
object->radius = abs(object->vertices[i].z);
|
||||
if (fabsf(object->vertices[i].z) > object->radius) {
|
||||
object->radius = fabsf(object->vertices[i].z);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue