src/vertex.cpp

changeset 5
593a658cba8e
parent 3
55a55a9ec2c2
child 6
73e448b2943d
--- a/src/vertex.cpp	Mon Sep 23 14:06:36 2019 +0300
+++ b/src/vertex.cpp	Thu Oct 03 11:45:44 2019 +0300
@@ -31,7 +31,7 @@
 }
 */
 
-double& Vertex::operator[](Axis axis)
+Vertex::ValueType& Vertex::operator[](Axis axis)
 {
 	switch (axis)
 	{
@@ -46,7 +46,7 @@
 	}
 }
 
-double Vertex::operator[](Axis axis) const
+Vertex::ValueType Vertex::operator[](Axis axis) const
 {
 	switch (axis)
 	{
@@ -57,11 +57,11 @@
 	case Z:
 		return this->z;
 	default:
-		return 0.0;
+		return 0;
 	}
 }
 
-void Vertex::setCoordinate(Axis axis, qreal value)
+void Vertex::setCoordinate(Axis axis, ValueType value)
 {
 	(*this)[axis] = value;
 }
@@ -71,7 +71,7 @@
 	return {vector.x(), vector.y(), vector.z()};
 }
 
-Vertex Vertex::operator*(qreal scalar) const
+Vertex Vertex::operator*(ValueType scalar) const
 {
 	return {this->x * scalar, this->y * scalar, this->z * scalar};
 }
@@ -125,7 +125,7 @@
 	};
 }
 
-Vertex& Vertex::operator*=(qreal scalar)
+Vertex& Vertex::operator*=(ValueType scalar)
 {
 	x *= scalar;
 	y *= scalar;

mercurial