summaryrefslogtreecommitdiffstats
path: root/source/Vector3f.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-12 05:46:01 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-12 05:46:01 +0100
commit43e684071933adef93040e8d4b830d5c6b71cf9a (patch)
tree014e5300feb1cdbbb8f24e4e42594eeb841f0be2 /source/Vector3f.h
parentFixed rclk in doublechests (diff)
downloadcuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.gz
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.bz2
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.lz
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.xz
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.zst
cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.zip
Diffstat (limited to 'source/Vector3f.h')
-rw-r--r--source/Vector3f.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/source/Vector3f.h b/source/Vector3f.h
index 4c95e20de..adb154ad7 100644
--- a/source/Vector3f.h
+++ b/source/Vector3f.h
@@ -4,28 +4,28 @@
class Vector3i;
class Vector3d;
-class Vector3f //tolua_export
-{ //tolua_export
-public: //tolua_export
- Vector3f( const Vector3d & v ); //tolua_export
- Vector3f( const Vector3d * v ); //tolua_export
- Vector3f( const Vector3i & v ); //tolua_export
- Vector3f( const Vector3i * v ); //tolua_export
+class Vector3f // tolua_export
+{ // tolua_export
+public: // tolua_export
+ Vector3f( const Vector3d & v ); // tolua_export
+ Vector3f( const Vector3d * v ); // tolua_export
+ Vector3f( const Vector3i & v ); // tolua_export
+ Vector3f( const Vector3i * v ); // tolua_export
- Vector3f() : x(0), y(0), z(0) {} //tolua_export
- Vector3f(float a_x, float a_y, float a_z) : x(a_x), y(a_y), z(a_z) {} //tolua_export
+ Vector3f() : x(0), y(0), z(0) {} // tolua_export
+ Vector3f(float a_x, float a_y, float a_z) : x(a_x), y(a_y), z(a_z) {} // tolua_export
- inline void Set(float a_x, float a_y, float a_z) { x = a_x, y = a_y, z = a_z; } //tolua_export
- inline void Normalize() { float l = 1.0f / Length(); x *= l; y *= l; z *= l; } //tolua_export
- inline Vector3f NormalizeCopy() const { float l = 1.0f / Length(); return Vector3f( x * l, y * l, z * l ); }//tolua_export
- inline void NormalizeCopy(Vector3f & a_V) const { float l = 1.0f / Length(); a_V.Set(x*l, y*l, z*l ); } //tolua_export
- inline float Length() const { return (float)sqrtf( x * x + y * y + z * z ); } //tolua_export
- inline float SqrLength() const { return x * x + y * y + z * z; } //tolua_export
- inline float Dot( const Vector3f & a_V ) const { return x * a_V.x + y * a_V.y + z * a_V.z; } //tolua_export
- inline Vector3f Cross( const Vector3f & v ) const { return Vector3f( y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); } //tolua_export
+ inline void Set(float a_x, float a_y, float a_z) { x = a_x, y = a_y, z = a_z; } // tolua_export
+ inline void Normalize() { float l = 1.0f / Length(); x *= l; y *= l; z *= l; } // tolua_export
+ inline Vector3f NormalizeCopy() const { float l = 1.0f / Length(); return Vector3f( x * l, y * l, z * l ); }// tolua_export
+ inline void NormalizeCopy(Vector3f & a_V) const { float l = 1.0f / Length(); a_V.Set(x*l, y*l, z*l ); } // tolua_export
+ inline float Length() const { return (float)sqrtf( x * x + y * y + z * z ); } // tolua_export
+ inline float SqrLength() const { return x * x + y * y + z * z; } // tolua_export
+ inline float Dot( const Vector3f & a_V ) const { return x * a_V.x + y * a_V.y + z * a_V.z; } // tolua_export
+ inline Vector3f Cross( const Vector3f & v ) const { return Vector3f( y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); } // tolua_export
- inline bool Equals( const Vector3f & v ) const { return (x == v.x && y == v.y && z == v.z ); } //tolua_export
+ inline bool Equals( const Vector3f & v ) const { return (x == v.x && y == v.y && z == v.z ); } // tolua_export
void operator += ( const Vector3f& a_V ) { x += a_V.x; y += a_V.y; z += a_V.z; }
void operator += ( Vector3f* a_V ) { x += a_V->x; y += a_V->y; z += a_V->z; }
@@ -35,13 +35,13 @@ public: //tolua_export
void operator *= ( Vector3f* a_V ) { x *= a_V->x; y *= a_V->y; z *= a_V->z; }
void operator *= ( const Vector3f& a_V ) { x *= a_V.x; y *= a_V.y; z *= a_V.z; }
- Vector3f operator + ( const Vector3f& v2 ) const { return Vector3f( x + v2.x, y + v2.y, z + v2.z ); } //tolua_export
- Vector3f operator + ( const Vector3f* v2 ) const { return Vector3f( x + v2->x, y + v2->y, z + v2->z ); } //tolua_export
- Vector3f operator - ( const Vector3f& v2 ) const { return Vector3f( x - v2.x, y - v2.y, z - v2.z ); } //tolua_export
- Vector3f operator - ( const Vector3f* v2 ) const { return Vector3f( x - v2->x, y - v2->y, z - v2->z ); } //tolua_export
- Vector3f operator * ( const float f ) const { return Vector3f( x * f, y * f, z * f ); } //tolua_export
- Vector3f operator * ( const Vector3f& v2 ) const { return Vector3f( x * v2.x, y * v2.y, z * v2.z ); } //tolua_export
+ Vector3f operator + ( const Vector3f& v2 ) const { return Vector3f( x + v2.x, y + v2.y, z + v2.z ); } // tolua_export
+ Vector3f operator + ( const Vector3f* v2 ) const { return Vector3f( x + v2->x, y + v2->y, z + v2->z ); } // tolua_export
+ Vector3f operator - ( const Vector3f& v2 ) const { return Vector3f( x - v2.x, y - v2.y, z - v2.z ); } // tolua_export
+ Vector3f operator - ( const Vector3f* v2 ) const { return Vector3f( x - v2->x, y - v2->y, z - v2->z ); } // tolua_export
+ Vector3f operator * ( const float f ) const { return Vector3f( x * f, y * f, z * f ); } // tolua_export
+ Vector3f operator * ( const Vector3f& v2 ) const { return Vector3f( x * v2.x, y * v2.y, z * v2.z ); } // tolua_export
- float x, y, z; //tolua_export
+ float x, y, z; // tolua_export
-};//tolua_export \ No newline at end of file
+};// tolua_export