summaryrefslogtreecommitdiffstats
path: root/tksao/vector/vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'tksao/vector/vector.h')
-rw-r--r--tksao/vector/vector.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/tksao/vector/vector.h b/tksao/vector/vector.h
index 55efda8..915c81c 100644
--- a/tksao/vector/vector.h
+++ b/tksao/vector/vector.h
@@ -38,10 +38,9 @@ class Vector {
Vector(const Vector3d&);
Vector& operator=(const Vector3d&);
- double& operator[](int i)
- {return v[i];} // return element
- double* vv()
- {return v;} // return vector
+ const double& operator[](int i) const {return v[i];} // return element
+ double& operator[](int i) {return v[i];} // return element
+ double* vv() {return v;} // return vector
Vector& origin()
{v[0]=0; v[1]=0; v[2]=1; return *this;}