mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
add Vec3.distance(Vec3, Vec3) for JS
This commit is contained in:
parent
ecae89489e
commit
2d5bfc81cd
2 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,10 @@ float Vec3::length(const glm::vec3& v) {
|
|||
return glm::length(v);
|
||||
}
|
||||
|
||||
float Vec3::distance(const glm::vec3& v1, const glm::vec3& v2) {
|
||||
return glm::distance(v1, v2);
|
||||
}
|
||||
|
||||
glm::vec3 Vec3::normalize(const glm::vec3& v) {
|
||||
return glm::normalize(v);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ public slots:
|
|||
glm::vec3 sum(const glm::vec3& v1, const glm::vec3& v2);
|
||||
glm::vec3 subtract(const glm::vec3& v1, const glm::vec3& v2);
|
||||
float length(const glm::vec3& v);
|
||||
float distance(const glm::vec3& v1, const glm::vec3& v2);
|
||||
glm::vec3 normalize(const glm::vec3& v);
|
||||
void print(const QString& lable, const glm::vec3& v);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue