From 037d213fdf48283192fb0c6e3494f627fbc6af06 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 27 Apr 2023 20:14:09 -0400 Subject: [PATCH] ICC: Make struct XYZ store float instead of double Should be good enough. --- Userland/Libraries/LibGfx/ICC/BinaryFormat.h | 2 +- Userland/Libraries/LibGfx/ICC/TagTypes.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibGfx/ICC/BinaryFormat.h b/Userland/Libraries/LibGfx/ICC/BinaryFormat.h index 18b5402caa..851d10d51a 100644 --- a/Userland/Libraries/LibGfx/ICC/BinaryFormat.h +++ b/Userland/Libraries/LibGfx/ICC/BinaryFormat.h @@ -48,7 +48,7 @@ struct XYZNumber { operator XYZ() const { - return XYZ { x / (double)0x1'0000, y / (double)0x1'0000, z / (double)0x1'0000 }; + return XYZ { x / (float)0x1'0000, y / (float)0x1'0000, z / (float)0x1'0000 }; } }; diff --git a/Userland/Libraries/LibGfx/ICC/TagTypes.h b/Userland/Libraries/LibGfx/ICC/TagTypes.h index ed7ee726bc..9dd94a8383 100644 --- a/Userland/Libraries/LibGfx/ICC/TagTypes.h +++ b/Userland/Libraries/LibGfx/ICC/TagTypes.h @@ -21,9 +21,9 @@ using S15Fixed16 = FixedPoint<16, i32>; using U16Fixed16 = FixedPoint<16, u32>; struct XYZ { - double x { 0 }; - double y { 0 }; - double z { 0 }; + float x { 0 }; + float y { 0 }; + float z { 0 }; bool operator==(const XYZ&) const = default; };