Added a scalar divisor operator
This commit is contained in:
@@ -78,6 +78,12 @@ V3D<Type> V3D<Type>::operator*(Type scalar) const
|
|||||||
return V3D<Type>{this->x * scalar, this->y * scalar, this->z * scalar};
|
return V3D<Type>{this->x * scalar, this->y * scalar, this->z * scalar};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Type>
|
||||||
|
V3D<Type> V3D<Type>::operator/(Type scalar) const
|
||||||
|
{
|
||||||
|
return V3D<Type>{this->x / scalar, this->y / scalar, this->z / scalar};
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
V3D<Type> &V3D<Type>::operator+=(const V3D<Type> &other)
|
V3D<Type> &V3D<Type>::operator+=(const V3D<Type> &other)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ public:
|
|||||||
|
|
||||||
V3D<Type> operator*(Type scalar) const;
|
V3D<Type> operator*(Type scalar) const;
|
||||||
|
|
||||||
|
V3D<Type> operator/(Type scalar) const;
|
||||||
|
|
||||||
void operator=(const V3D<Type> &other);
|
void operator=(const V3D<Type> &other);
|
||||||
|
|
||||||
V3D<Type> &operator+=(const V3D<Type> &other);
|
V3D<Type> &operator+=(const V3D<Type> &other);
|
||||||
|
|||||||
Reference in New Issue
Block a user