summaryrefslogtreecommitdiffstats
path: root/src/Vector3.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-14 14:01:45 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-14 14:01:45 +0100
commit692cf5bb70dfc63f7e1b9a67e29c9ede22d9359c (patch)
tree2853a32cdcb75006d49907b9da98d03b640991f5 /src/Vector3.h
parentFixed comma (diff)
parentMerge pull request #793 from xdot/master (diff)
downloadcuberite-692cf5bb70dfc63f7e1b9a67e29c9ede22d9359c.tar
cuberite-692cf5bb70dfc63f7e1b9a67e29c9ede22d9359c.tar.gz
cuberite-692cf5bb70dfc63f7e1b9a67e29c9ede22d9359c.tar.bz2
cuberite-692cf5bb70dfc63f7e1b9a67e29c9ede22d9359c.tar.lz
cuberite-692cf5bb70dfc63f7e1b9a67e29c9ede22d9359c.tar.xz
cuberite-692cf5bb70dfc63f7e1b9a67e29c9ede22d9359c.tar.zst
cuberite-692cf5bb70dfc63f7e1b9a67e29c9ede22d9359c.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)
);
}