summaryrefslogtreecommitdiff
path: root/frontend/shared_cpp/mathlib.h
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-04-26 20:51:09 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-04-26 20:51:09 -0400
commita32157049d860c4c9c6ffb0df6c3cdbf53e4ef1d (patch)
treefcdf2a06b07ef143f6615f71a6e26f3a1587b80d /frontend/shared_cpp/mathlib.h
parentcdf770d6950befd25779a18ea3972deeb9f143bb (diff)
Getting started on rectangle collisions
Diffstat (limited to 'frontend/shared_cpp/mathlib.h')
-rw-r--r--frontend/shared_cpp/mathlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/frontend/shared_cpp/mathlib.h b/frontend/shared_cpp/mathlib.h
index a08ec39..3ed61cd 100644
--- a/frontend/shared_cpp/mathlib.h
+++ b/frontend/shared_cpp/mathlib.h
@@ -110,6 +110,10 @@ struct Vector4 {
float scale = 1.f / 255.f;
return { r * scale, g * scale, b * scale, a * scale };
}
+
+ Vector4 toNormalizedColor() {
+ return fromColor(x, y, z, w);
+ }
};
struct Mat4x4 {