Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix windows build #20

Merged
merged 2 commits into from
Sep 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include "image.h"
#include <stdlib.h>
#include "logger.h"
#include "utils.h"

Expand Down
8 changes: 4 additions & 4 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inline SpvmU32 bitMask(int bits) {
}

inline bool fEqual(SpvmF32 a, SpvmF32 b) {
return fabs(a - b) <= FLT_EPSILON;
return fabsf(a - b) <= FLT_EPSILON;
}

inline SpvmU32 bitInsert(SpvmU32 base, SpvmU32 insert, SpvmI32 offset, SpvmI32 count) {
Expand Down Expand Up @@ -99,14 +99,14 @@ inline SpvmF32 fPow(SpvmF32 x, SpvmF32 y) {
}

inline SpvmF32 fAsin(SpvmF32 x) {
if (abs(x) > 1) {
if (fabsf(x) > 1) {
return SpvmNAN;
}
return asin(x);
}

inline SpvmF32 fAcos(SpvmF32 x) {
if (abs(x) > 1) {
if (fabsf(x) > 1) {
return SpvmNAN;
}
return acos(x);
Expand All @@ -120,7 +120,7 @@ inline SpvmF32 fAcosh(SpvmF32 x) {
}

inline SpvmF32 fAtanh(SpvmF32 x) {
if (abs(x) >= 1) {
if (fabsf(x) >= 1) {
return SpvmNAN;
}
return atanh(x);
Expand Down