]> git.lizzy.rs Git - irrlicht.git/blobdiff - include/vector3d.h
Get rid of various old compiler and platform checks
[irrlicht.git] / include / vector3d.h
index 5f4f6133bd8d3cb9be00b511ca349b6e09bd430d..4dbc53b844df2249f96e482e442fe91a7843b451 100644 (file)
@@ -28,15 +28,11 @@ namespace core
                vector3d(T nx, T ny, T nz) : X(nx), Y(ny), Z(nz) {}\r
                //! Constructor with the same value for all elements\r
                explicit vector3d(T n) : X(n), Y(n), Z(n) {}\r
-               //! Copy constructor\r
-               vector3d(const vector3d<T>& other) : X(other.X), Y(other.Y), Z(other.Z) {}\r
 \r
                // operators\r
 \r
                vector3d<T> operator-() const { return vector3d<T>(-X, -Y, -Z); }\r
 \r
-               vector3d<T>& operator=(const vector3d<T>& other) { X = other.X; Y = other.Y; Z = other.Z; return *this; }\r
-\r
                vector3d<T> operator+(const vector3d<T>& other) const { return vector3d<T>(X + other.X, Y + other.Y, Z + other.Z); }\r
                vector3d<T>& operator+=(const vector3d<T>& other) { X+=other.X; Y+=other.Y; Z+=other.Z; return *this; }\r
                vector3d<T> operator+(const T val) const { return vector3d<T>(X + val, Y + val, Z + val); }\r
@@ -54,8 +50,8 @@ namespace core
 \r
                vector3d<T> operator/(const vector3d<T>& other) const { return vector3d<T>(X / other.X, Y / other.Y, Z / other.Z); }\r
                vector3d<T>& operator/=(const vector3d<T>& other) { X/=other.X; Y/=other.Y; Z/=other.Z; return *this; }\r
-               vector3d<T> operator/(const T v) const { T i=(T)1.0/v; return vector3d<T>(X * i, Y * i, Z * i); }\r
-               vector3d<T>& operator/=(const T v) { T i=(T)1.0/v; X*=i; Y*=i; Z*=i; return *this; }\r
+               vector3d<T> operator/(const T v) const { return vector3d<T>(X/v, Y/v, Z/v); }\r
+               vector3d<T>& operator/=(const T v) { X/=v; Y/=v; Z/=v; return *this; }\r
 \r
                T& operator [](u32 index)\r
                {\r