mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-24 22:46:39 +02:00
add multiply(float, Vec3) because multiply commutes
This commit is contained in:
parent
76f78e77d1
commit
09d3c51120
2 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,10 @@ glm::vec3 Vec3::multiply(const glm::vec3& v1, float f) {
|
||||||
return v1 * f;
|
return v1 * f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glm::vec3 Vec3::multiply(float f, const glm::vec3& v1) {
|
||||||
|
return v1 * f;
|
||||||
|
}
|
||||||
|
|
||||||
glm::vec3 Vec3::multiplyQbyV(const glm::quat& q, const glm::vec3& v) {
|
glm::vec3 Vec3::multiplyQbyV(const glm::quat& q, const glm::vec3& v) {
|
||||||
return q * v;
|
return q * v;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ public slots:
|
||||||
glm::vec3 cross(const glm::vec3& v1, const glm::vec3& v2);
|
glm::vec3 cross(const glm::vec3& v1, const glm::vec3& v2);
|
||||||
float dot(const glm::vec3& v1, const glm::vec3& v2);
|
float dot(const glm::vec3& v1, const glm::vec3& v2);
|
||||||
glm::vec3 multiply(const glm::vec3& v1, float f);
|
glm::vec3 multiply(const glm::vec3& v1, float f);
|
||||||
|
glm::vec3 multiply(float, const glm::vec3& v1);
|
||||||
glm::vec3 multiplyQbyV(const glm::quat& q, const glm::vec3& v);
|
glm::vec3 multiplyQbyV(const glm::quat& q, const glm::vec3& v);
|
||||||
glm::vec3 sum(const glm::vec3& v1, const glm::vec3& v2);
|
glm::vec3 sum(const glm::vec3& v1, const glm::vec3& v2);
|
||||||
glm::vec3 subtract(const glm::vec3& v1, const glm::vec3& v2);
|
glm::vec3 subtract(const glm::vec3& v1, const glm::vec3& v2);
|
||||||
|
|
Loading…
Reference in a new issue