src/basics.h

changeset 1002
a3ee23db8393
parent 978
4603d8fd063e
child 1006
a6b462051ae0
--- a/src/basics.h	Sun Oct 04 04:27:38 2015 +0300
+++ b/src/basics.h	Sun Oct 04 06:31:36 2015 +0300
@@ -70,10 +70,19 @@
 	void	transform (const Matrix& matr, const Vertex& pos);
 	void	setCoordinate (Axis ax, qreal value);
 
+	Vertex&	operator+= (const Vertex& other);
+	Vertex	operator+ (const Vertex& other) const;
+	Vertex&	operator*= (qreal scalar);
+	Vertex	operator* (qreal scalar) const;
 	bool	operator< (const Vertex& other) const;
 	double	operator[] (Axis ax) const;
 };
 
+inline Vertex operator* (qreal scalar, const Vertex& vertex)
+{
+	return vertex * scalar;
+}
+
 Q_DECLARE_METATYPE (Vertex)
 
 //

mercurial