mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
Declare varables at top of scope for ivec[2|3|4]
This commit is contained in:
@@ -179,9 +179,10 @@ glm_ivec3_scale(ivec3 v, int s, ivec3 dest) {
|
||||
CGLM_INLINE
|
||||
int
|
||||
glm_ivec3_distance2(ivec3 a, ivec3 b) {
|
||||
int xd = a[0] - b[0];
|
||||
int yd = a[1] - b[1];
|
||||
int zd = a[2] - b[2];
|
||||
int xd, yd, zd;
|
||||
xd = a[0] - b[0];
|
||||
yd = a[1] - b[1];
|
||||
zd = a[2] - b[2];
|
||||
return xd * xd + yd * yd + zd * zd;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user