add getNormalized()

This commit is contained in:
h4570
2022-08-14 20:59:59 +02:00
parent 26596fa2c3
commit d0085e834e
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -228,6 +228,12 @@ void Vec4::normalize() {
: "r"(this->xyzw));
}
Vec4 Vec4::getNormalized() const {
Vec4 result(*this);
result.normalize();
return result;
}
float Vec4::distanceTo(const Vec4& v) const {
float result;
asm volatile(