diff options
author | Jakob Odersky <jodersky@gmail.com> | 2011-03-02 14:53:18 +0000 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2011-03-02 14:53:18 +0000 |
commit | 6cefc36791afe98cbaaa95056ac5f2d64e240901 (patch) | |
tree | 207b685717a913a2b1242c07b572501b3d9bf374 /src | |
parent | 44f26b2b6ea3b43e2a56c5f5b2e00069e17f7d62 (diff) | |
download | vhc-6cefc36791afe98cbaaa95056ac5f2d64e240901.tar.gz vhc-6cefc36791afe98cbaaa95056ac5f2d64e240901.tar.bz2 vhc-6cefc36791afe98cbaaa95056ac5f2d64e240901.zip |
Made Vector3 static variables Null, i, j, k constant.
Diffstat (limited to 'src')
-rw-r--r-- | src/vhc/Vector3.cc | 8 | ||||
-rw-r--r-- | src/vhc/Vector3.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/vhc/Vector3.cc b/src/vhc/Vector3.cc index 9628036..deb56b9 100644 --- a/src/vhc/Vector3.cc +++ b/src/vhc/Vector3.cc @@ -12,10 +12,10 @@ using namespace std; namespace vhc { -Vector3 Vector3::Null = Vector3(0.0, 0.0, 0.0); -Vector3 Vector3::i = Vector3(1.0, 0.0, 0.0); -Vector3 Vector3::j = Vector3(0.0, 1.0, 0.0); -Vector3 Vector3::k = Vector3(0.0, 0.0, 1.0); +Vector3 const Vector3::Null = Vector3(0.0, 0.0, 0.0); +Vector3 const Vector3::i = Vector3(1.0, 0.0, 0.0); +Vector3 const Vector3::j = Vector3(0.0, 1.0, 0.0); +Vector3 const Vector3::k = Vector3(0.0, 0.0, 1.0); ostream& operator<< (ostream& output, const Vector3& v) { output << v.toString(); diff --git a/src/vhc/Vector3.h b/src/vhc/Vector3.h index 5789968..9969352 100644 --- a/src/vhc/Vector3.h +++ b/src/vhc/Vector3.h @@ -89,16 +89,16 @@ public: }; /** Null vector. (0,0,0) */ - static Vector3 Null; + static const Vector3 Null; /** X-axis unit vector. (1, 0, 0) */ - static Vector3 i; + static const Vector3 i; /** Y-axis unit vector. (0, 1, 0) */ - static Vector3 j; + static const Vector3 j; /** Z-axis unit vector. (0, 0, 1) */ - static Vector3 k; + static const Vector3 k; }; |