]> git.localhorst.tv Git - l2e.git/commitdiff
made vector components writable
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 29 Nov 2012 14:24:28 +0000 (15:24 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 29 Nov 2012 14:24:28 +0000 (15:24 +0100)
src/geometry/Vector.h

index ebff4b3905d14e209d9a877f66982700b925755f..c0b22e51d9b93d154d6dcb3ca1234d8fb7c3ae00 100644 (file)
@@ -31,6 +31,9 @@ public:
        Scalar X() const { return x; }
        Scalar Y() const { return y; }
 
+       Scalar &X() { return x; }
+       Scalar &Y() { return y; }
+
        Scalar Index(Scalar lineLength) const { return Y() * lineLength + X(); }
        static Vector<Scalar> FromIndex(Scalar index, Scalar lineLength) {
                return Vector<Scalar>(index % lineLength, index / lineLength);