Skip to content

Commit 853f059

Browse files
committed
use std::fabs for float type(std::abs is only available for integer type)
1 parent 804be4e commit 853f059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tiny_obj_loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ static bool exportGroupsToShape(shape_t *shape, const PrimGroup &prim_group,
16401640
TinyObjPoint axis_w, axis_v, axis_u;
16411641
axis_w = n;
16421642
TinyObjPoint a;
1643-
if(std::abs(axis_w.x) > real_t(0.9999999)) {
1643+
if(std::fabs(axis_w.x) > real_t(0.9999999)) {
16441644
a = TinyObjPoint(0,1,0);
16451645
} else {
16461646
a = TinyObjPoint(1,0,0);

0 commit comments

Comments
 (0)