summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-03-12 15:30:57 +0100
committerandrew <xdotftw@gmail.com>2014-03-12 15:30:57 +0100
commit4a883be428ef1d8b22887eeb52736529658c7fd2 (patch)
tree950ddf04f60e94f8a3710e7b05100d465504895b
parentM_PI MSVC Fix (diff)
downloadcuberite-4a883be428ef1d8b22887eeb52736529658c7fd2.tar
cuberite-4a883be428ef1d8b22887eeb52736529658c7fd2.tar.gz
cuberite-4a883be428ef1d8b22887eeb52736529658c7fd2.tar.bz2
cuberite-4a883be428ef1d8b22887eeb52736529658c7fd2.tar.lz
cuberite-4a883be428ef1d8b22887eeb52736529658c7fd2.tar.xz
cuberite-4a883be428ef1d8b22887eeb52736529658c7fd2.tar.zst
cuberite-4a883be428ef1d8b22887eeb52736529658c7fd2.zip
Diffstat (limited to '')
-rw-r--r--src/Vector3.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Vector3.h b/src/Vector3.h
index b7a810fc5..ba4abe3eb 100644
--- a/src/Vector3.h
+++ b/src/Vector3.h
@@ -52,9 +52,9 @@ public:
{
double Len = 1.0 / Length();
- x *= Len;
- y *= Len;
- z *= Len;
+ x = (T)(x * Len);
+ y = (T)(y * Len);
+ z = (T)(z * Len);
}
inline Vector3<T> NormalizeCopy(void) const
@@ -62,9 +62,9 @@ public:
double Len = 1.0 / Length();
return Vector3<T>(
- x * Len,
- y * Len,
- z * Len
+ (T)(x * Len),
+ (T)(y * Len),
+ (T)(z * Len)
);
}
@@ -73,9 +73,9 @@ public:
double Len = 1.0 / Length();
a_Rhs.Set(
- x * Len,
- y * Len,
- z * Len
+ (T)(x * Len),
+ (T)(y * Len),
+ (T)(z * Len)
);
}