projects
/
miniglut
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83cc39b
)
let's avoid int32_t since we don't use libc
author
John Tsiombikas
<nuclear@member.fsf.org>
Fri, 7 Aug 2020 12:35:54 +0000
(15:35 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Fri, 7 Aug 2020 12:35:54 +0000
(15:35 +0300)
miniglut.c
patch
|
blob
|
history
diff --git
a/miniglut.c
b/miniglut.c
index
0cac4a1
..
ccb6c5c
100644
(file)
--- a/
miniglut.c
+++ b/
miniglut.c
@@
-2300,7
+2300,7
@@
static void bezier_patch(float *res, float *cp, float u, float v)
static float rsqrt(float x)
{
float xhalf = x * 0.5f;
- int32_t i = *(int32_t*)&x;
+ int i = *(int*)&x;
i = 0x5f3759df - (i >> 1);
x = *(float*)&i;
x = x * (1.5f - xhalf * x * x);