From e68d14c4d5b4cced62c2148323c38e7f49292bd7 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 17 Jun 2021 20:44:55 -0400 Subject: Rotating 3d square --- shared_cpp/RenderShared.cpp | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 shared_cpp/RenderShared.cpp (limited to 'shared_cpp/RenderShared.cpp') diff --git a/shared_cpp/RenderShared.cpp b/shared_cpp/RenderShared.cpp new file mode 100644 index 0000000..8b51c90 --- /dev/null +++ b/shared_cpp/RenderShared.cpp @@ -0,0 +1,6 @@ +#include "RenderShared.h" + +Color colorFromHex(float32 r, float32 g, float32 b, float32 a) { + float32 scale = 1.f / 255.f; + return { r * scale, g * scale, b * scale, a * scale }; +} -- cgit v1.2.1