From 3370f0ed85e19c48306a40be8a8e66da226e44c9 Mon Sep 17 00:00:00 2001 From: Metehan Tuncbilek Date: Tue, 6 Aug 2024 17:23:35 +0300 Subject: [PATCH 1/5] first test --- openVulkanoCpp/Math/RGB565.hpp | 57 +++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/openVulkanoCpp/Math/RGB565.hpp b/openVulkanoCpp/Math/RGB565.hpp index 1600b5a..d80c34e 100644 --- a/openVulkanoCpp/Math/RGB565.hpp +++ b/openVulkanoCpp/Math/RGB565.hpp @@ -7,20 +7,20 @@ #pragma once #include "Math/Math.hpp" +#include namespace OpenVulkano::Math { class RGB565 { - uint16_t Make5(uint8_t val) - { - return val * 31.0f / 255.0f; - } - - uint16_t Make6(uint8_t val) - { - return val * 63.0f / 255.0f; - } + static uint16_t Make5(uint8_t val) { return val * 31.0f / 255.0f; } + static uint16_t Make6(uint8_t val) { return val * 63.0f / 255.0f; } + static uint8_t Unmake5(uint16_t val) { return static_cast(val * 255.0f / 31.0f); } + static uint8_t Unmake6(uint16_t val) { return static_cast(val * 255.0f / 63.0f); } + static float Unmake5ToFloat(uint16_t val) {return std::clamp(val / 31.0f, 0.0f, 1.0f); } + static float Unmake6ToFloat(uint16_t val) { return std::clamp(val / 63.0f, 0.0f, 1.0f); } + static uint16_t Make5FromFloat(float val) { return (uint16_t)std::clamp(val * 31.0f, 0.0f, 31.f); } + static uint16_t Make6FromFloat(float val) { return (uint16_t) std::clamp(val * 63.0f, 0.0f, 63.f); } public: union @@ -34,12 +34,39 @@ namespace OpenVulkano::Math }; }; - RGB565(Math::Vector4uc color = {0, 0, 0, 1}) - : b(Make5(color.b)) - , g(Make6(color.g)) - , r(Make5(color.r)) - { - } + RGB565(Math::Vector4uc color = { 0, 0, 0, 1 }) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) {} + RGB565(Math::Vector3uc color = { 0, 0, 0 }) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) {} + RGB565(Math::Vector4uc_SIMD color = { 0, 0, 0, 1 }) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) {} + RGB565(Math::Vector3uc_SIMD color = { 0, 0, 0 }) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) {} + RGB565(Math::Vector4f color = {0.f, 0.f, 0.f, 1.f}) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) {} + RGB565(Math::Vector3f color = { 0.f, 0.f, 0.f }) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) {} + RGB565(Math::Vector3f_SIMD color = { 0.f, 0.f, 0.f }) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) {} + RGB565(Math::Vector4f_SIMD color = { 0.f, 0.f, 0.f, 1.f }) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) {} + + + uint8_t GetR() { return Unmake5(r); } + uint8_t GetG() { return Unmake6(g); } + uint8_t GetB() { return Unmake5(b); } + + Math::Vector4uc GetColor() { return { GetR(), GetG(), GetB(), 1 }; } + + void SetR(uint8_t red) { r = Make5(red); } + void SetG(uint8_t green) { g = Make6(green); } + void SetB(uint8_t blue) { b = Make5(blue); } + + void SetColor(Math::Vector4uc color) { b = Make5(color.b); g = Make6(color.g); r = Make5(color.r); } + + float GetRFloat() { return Unmake5ToFloat(r); } + float GetGFloat() { return Unmake6ToFloat(g); } + float GetBFloat() { return Unmake5ToFloat(b); } + + Math::Vector4f GetColorFloat() { return { GetRFloat(), GetGFloat(), GetBFloat(), 1.0f }; } + + void SetRNormalized(float red) { r = Make5FromFloat(red); } + void SetGNormalized(float green) { g = Make6FromFloat(green); } + void SetBNormalized(float blue) { b = Make5FromFloat(blue); } + + void SetColorNormalized(Math::Vector4f color) { b = Make5FromFloat(color.b); g = Make6FromFloat(color.g); r = Make5FromFloat(color.r); } }; static_assert(sizeof(RGB565) == 2); From 2df7280057923b7383d56096eae675db1cb3b532 Mon Sep 17 00:00:00 2001 From: Metehan Tuncbilek Date: Thu, 8 Aug 2024 14:26:47 +0300 Subject: [PATCH 2/5] finished RGB565 --- openVulkanoCpp/Math/RGB565.hpp | 305 +++++++++++++++++++++++++++++++-- 1 file changed, 289 insertions(+), 16 deletions(-) diff --git a/openVulkanoCpp/Math/RGB565.hpp b/openVulkanoCpp/Math/RGB565.hpp index d80c34e..9077f5d 100644 --- a/openVulkanoCpp/Math/RGB565.hpp +++ b/openVulkanoCpp/Math/RGB565.hpp @@ -17,9 +17,9 @@ namespace OpenVulkano::Math static uint16_t Make6(uint8_t val) { return val * 63.0f / 255.0f; } static uint8_t Unmake5(uint16_t val) { return static_cast(val * 255.0f / 31.0f); } static uint8_t Unmake6(uint16_t val) { return static_cast(val * 255.0f / 63.0f); } - static float Unmake5ToFloat(uint16_t val) {return std::clamp(val / 31.0f, 0.0f, 1.0f); } + static float Unmake5ToFloat(uint16_t val) { return std::clamp(val / 31.0f, 0.0f, 1.0f); } static float Unmake6ToFloat(uint16_t val) { return std::clamp(val / 63.0f, 0.0f, 1.0f); } - static uint16_t Make5FromFloat(float val) { return (uint16_t)std::clamp(val * 31.0f, 0.0f, 31.f); } + static uint16_t Make5FromFloat(float val) { return (uint16_t) std::clamp(val * 31.0f, 0.0f, 31.f); } static uint16_t Make6FromFloat(float val) { return (uint16_t) std::clamp(val * 63.0f, 0.0f, 63.f); } public: @@ -34,39 +34,312 @@ namespace OpenVulkano::Math }; }; - RGB565(Math::Vector4uc color = { 0, 0, 0, 1 }) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) {} - RGB565(Math::Vector3uc color = { 0, 0, 0 }) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) {} - RGB565(Math::Vector4uc_SIMD color = { 0, 0, 0, 1 }) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) {} - RGB565(Math::Vector3uc_SIMD color = { 0, 0, 0 }) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) {} - RGB565(Math::Vector4f color = {0.f, 0.f, 0.f, 1.f}) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) {} - RGB565(Math::Vector3f color = { 0.f, 0.f, 0.f }) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) {} - RGB565(Math::Vector3f_SIMD color = { 0.f, 0.f, 0.f }) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) {} - RGB565(Math::Vector4f_SIMD color = { 0.f, 0.f, 0.f, 1.f }) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) {} - + template || std::is_signed_v>> + RGB565(const Math::Vector3& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) + { + } + template || std::is_signed_v>> + RGB565(const Math::Vector4& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) + { + } + template || std::is_signed_v>> + RGB565(const Math::Vector3_SIMD& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) + { + } + template || std::is_signed_v>> + RGB565(const Math::Vector4_SIMD& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) + { + } + template>> + RGB565(const Math::Vector3& color) + : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) + { + } + template>> + RGB565(const Math::Vector4& color) + : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) + { + } + template>> + RGB565(const Math::Vector3_SIMD& color) + : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) + { + } + template>> + RGB565(const Math::Vector4_SIMD& color) + : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) + { + } uint8_t GetR() { return Unmake5(r); } uint8_t GetG() { return Unmake6(g); } uint8_t GetB() { return Unmake5(b); } - Math::Vector4uc GetColor() { return { GetR(), GetG(), GetB(), 1 }; } + template || std::is_signed_v>> + Math::Vector3 Get3() + { + return { GetR(), GetG(), GetB() }; + } + template || std::is_signed_v>> + Math::Vector4 Get4() + { + return { GetR(), GetG(), GetB(), 1 }; + } + template || std::is_signed_v>> + Math::Vector3_SIMD GetSIMD() + { + return { GetR(), GetG(), GetB() }; + } + template || std::is_signed_v>> + Math::Vector4_SIMD Get4SIMD() + { + return { GetR(), GetG(), GetB(), 1 }; + } + template>> Math::Vector3 Get3Normalized() + { + return { GetRFloat(), GetGFloat(), GetBFloat() }; + } + template>> Math::Vector4 Get4Normalized() + { + return { GetRFloat(), GetGFloat(), GetBFloat(), 1 }; + } + template>> + Math::Vector3_SIMD Get3NormalizedSIMD() + { + return { GetRFloat(), GetGFloat(), GetBFloat() }; + } + template>> + Math::Vector4_SIMD Get4NormalizedSIMD() + { + return { GetRFloat(), GetGFloat(), GetBFloat(), 1 }; + } void SetR(uint8_t red) { r = Make5(red); } void SetG(uint8_t green) { g = Make6(green); } void SetB(uint8_t blue) { b = Make5(blue); } - void SetColor(Math::Vector4uc color) { b = Make5(color.b); g = Make6(color.g); r = Make5(color.r); } + template || std::is_signed_v>> + void Set(const Math::Vector3& color) + { + r = Make5(color.r); + g = Make6(color.g); + b = Make5(color.b); + } + + template || std::is_signed_v>> + void Set(const Math::Vector4& color) + { + r = Make5(color.r); + g = Make6(color.g); + b = Make5(color.b); + } + + template>> + void SetNormalized(const Math::Vector3& color) + { + r = Make5FromFloat(color.r); + g = Make6FromFloat(color.g); + b = Make5FromFloat(color.b); + } + + template>> + void SetNormalized(const Math::Vector4& color) + { + r = Make5FromFloat(color.r); + g = Make6FromFloat(color.g); + b = Make5FromFloat(color.b); + } float GetRFloat() { return Unmake5ToFloat(r); } float GetGFloat() { return Unmake6ToFloat(g); } float GetBFloat() { return Unmake5ToFloat(b); } - Math::Vector4f GetColorFloat() { return { GetRFloat(), GetGFloat(), GetBFloat(), 1.0f }; } - void SetRNormalized(float red) { r = Make5FromFloat(red); } void SetGNormalized(float green) { g = Make6FromFloat(green); } void SetBNormalized(float blue) { b = Make5FromFloat(blue); } - void SetColorNormalized(Math::Vector4f color) { b = Make5FromFloat(color.b); g = Make6FromFloat(color.g); r = Make5FromFloat(color.r); } + RGB565& operator=(const RGB565& other) + { + value = other.value; + return *this; + } + + RGB565& operator=(RGB565&& other) noexcept + { + value = other.value; + return *this; + } + + template || std::is_signed_v>> + RGB565& operator=(const Vector3& color) + { + Set(color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator=(const Vector4& color) + { + Set(color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator=(const Vector3_SIMD& color) + { + Set(color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator=(const Vector4_SIMD& color) + { + Set(color); + return *this; + } + + template>> + RGB565& operator=(const Vector3& color) + { + SetNormalized(color); + return *this; + } + + template>> + RGB565& operator=(const Vector4& color) + { + SetNormalized(color); + return *this; + } + + template>> + RGB565& operator=(const Vector3_SIMD& color) + { + SetNormalized(color); + return *this; + } + + template>> + RGB565& operator=(const Vector4_SIMD& color) + { + SetNormalized(color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator+=(const Vector3& color) + { + Set(Get3() + color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator+=(const Vector4& color) + { + Set(Get4() + color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator+=(const Vector3_SIMD& color) + { + Set(Get3SIMD() + color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator+=(const Vector4_SIMD& color) + { + Set(Get4SIMD() + color); + return *this; + } + + template>> + RGB565& operator+=(const Vector3& color) + { + SetNormalized(Get3Normalized() + color); + return *this; + } + + template>> + RGB565& operator+=(const Vector4& color) + { + SetNormalized(Get4Normalized() + color); + return *this; + } + + template>> + RGB565& operator+=(const Vector3_SIMD& color) + { + SetNormalized(Get3NormalizedSIMD() + color); + return *this; + } + + template>> + RGB565& operator+=(const Vector4_SIMD& color) + { + SetNormalized(Get4NormalizedSIMD() + color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator-=(const Vector3& color) + { + Set(Get3() - color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator-=(const Vector4& color) + { + Set(Get4() - color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator-=(const Vector3_SIMD& color) + { + Set(Get3SIMD() - color); + return *this; + } + + template || std::is_signed_v>> + RGB565& operator-=(const Vector4_SIMD& color) + { + Set(Get4SIMD() - color); + return *this; + } + + template>> + RGB565& operator-=(const Vector3& color) + { + SetNormalized(Get3Normalized() - color); + return *this; + } + + template>> + RGB565& operator-=(const Vector4& color) + { + SetNormalized(Get4Normalized() - color); + return *this; + } + + template>> + RGB565& operator-=(const Vector3_SIMD& color) + { + SetNormalized(Get3NormalizedSIMD() - color); + return *this; + } + + template>> + RGB565& operator-=(const Vector4_SIMD& color) + { + SetNormalized(Get4NormalizedSIMD() - color); + return *this; + } + + bool operator==(const RGB565& other) const { return value == other.value; } + bool operator!=(const RGB565& other) const { return value != other.value; } }; static_assert(sizeof(RGB565) == 2); From c7a9730897a8cd7261e3a10d978b865899ab4e0c Mon Sep 17 00:00:00 2001 From: Metehan Tuncbilek Date: Thu, 8 Aug 2024 15:53:18 +0300 Subject: [PATCH 3/5] casting operators --- openVulkanoCpp/Math/RGB565.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/openVulkanoCpp/Math/RGB565.hpp b/openVulkanoCpp/Math/RGB565.hpp index 9077f5d..f496777 100644 --- a/openVulkanoCpp/Math/RGB565.hpp +++ b/openVulkanoCpp/Math/RGB565.hpp @@ -340,6 +340,20 @@ namespace OpenVulkano::Math bool operator==(const RGB565& other) const { return value == other.value; } bool operator!=(const RGB565& other) const { return value != other.value; } + + template || std::is_signed_v>> + operator Math::Vector4() { return Get4(); } + template || std::is_signed_v>> + operator Math::Vector3() { return Get3(); } + template || std::is_signed_v>> + operator Math::Vector4_SIMD() { return Get4SIMD(); } + template || std::is_signed_v>> + operator Math::Vector3_SIMD() { return Get3SIMD(); } + template>> + operator Math::Vector4() { return Get4Normalized(); } + template>> + operator Math::Vector3() { return Get3Normalized(); } + }; static_assert(sizeof(RGB565) == 2); From b209b20dda664411ae949aebae265b83279736cd Mon Sep 17 00:00:00 2001 From: Metehan Tuncbilek Date: Fri, 9 Aug 2024 19:37:21 +0300 Subject: [PATCH 4/5] rgb565 vec4_simd removal --- openVulkanoCpp/Math/RGB565.hpp | 58 ++-------------------------------- 1 file changed, 2 insertions(+), 56 deletions(-) diff --git a/openVulkanoCpp/Math/RGB565.hpp b/openVulkanoCpp/Math/RGB565.hpp index f496777..5b40395 100644 --- a/openVulkanoCpp/Math/RGB565.hpp +++ b/openVulkanoCpp/Math/RGB565.hpp @@ -34,6 +34,8 @@ namespace OpenVulkano::Math }; }; + RGB565() : r(0), g(0), b(0) {} + template || std::is_signed_v>> RGB565(const Math::Vector3& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) { @@ -46,10 +48,6 @@ namespace OpenVulkano::Math RGB565(const Math::Vector3_SIMD& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) { } - template || std::is_signed_v>> - RGB565(const Math::Vector4_SIMD& color) : b(Make5(color.b)), g(Make6(color.g)), r(Make5(color.r)) - { - } template>> RGB565(const Math::Vector3& color) : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) @@ -65,11 +63,6 @@ namespace OpenVulkano::Math : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) { } - template>> - RGB565(const Math::Vector4_SIMD& color) - : b(Make5FromFloat(color.b)), g(Make6FromFloat(color.g)), r(Make5FromFloat(color.r)) - { - } uint8_t GetR() { return Unmake5(r); } uint8_t GetG() { return Unmake6(g); } @@ -90,11 +83,6 @@ namespace OpenVulkano::Math { return { GetR(), GetG(), GetB() }; } - template || std::is_signed_v>> - Math::Vector4_SIMD Get4SIMD() - { - return { GetR(), GetG(), GetB(), 1 }; - } template>> Math::Vector3 Get3Normalized() { return { GetRFloat(), GetGFloat(), GetBFloat() }; @@ -108,11 +96,6 @@ namespace OpenVulkano::Math { return { GetRFloat(), GetGFloat(), GetBFloat() }; } - template>> - Math::Vector4_SIMD Get4NormalizedSIMD() - { - return { GetRFloat(), GetGFloat(), GetBFloat(), 1 }; - } void SetR(uint8_t red) { r = Make5(red); } void SetG(uint8_t green) { g = Make6(green); } @@ -219,13 +202,6 @@ namespace OpenVulkano::Math return *this; } - template>> - RGB565& operator=(const Vector4_SIMD& color) - { - SetNormalized(color); - return *this; - } - template || std::is_signed_v>> RGB565& operator+=(const Vector3& color) { @@ -247,13 +223,6 @@ namespace OpenVulkano::Math return *this; } - template || std::is_signed_v>> - RGB565& operator+=(const Vector4_SIMD& color) - { - Set(Get4SIMD() + color); - return *this; - } - template>> RGB565& operator+=(const Vector3& color) { @@ -275,13 +244,6 @@ namespace OpenVulkano::Math return *this; } - template>> - RGB565& operator+=(const Vector4_SIMD& color) - { - SetNormalized(Get4NormalizedSIMD() + color); - return *this; - } - template || std::is_signed_v>> RGB565& operator-=(const Vector3& color) { @@ -303,13 +265,6 @@ namespace OpenVulkano::Math return *this; } - template || std::is_signed_v>> - RGB565& operator-=(const Vector4_SIMD& color) - { - Set(Get4SIMD() - color); - return *this; - } - template>> RGB565& operator-=(const Vector3& color) { @@ -331,13 +286,6 @@ namespace OpenVulkano::Math return *this; } - template>> - RGB565& operator-=(const Vector4_SIMD& color) - { - SetNormalized(Get4NormalizedSIMD() - color); - return *this; - } - bool operator==(const RGB565& other) const { return value == other.value; } bool operator!=(const RGB565& other) const { return value != other.value; } @@ -346,8 +294,6 @@ namespace OpenVulkano::Math template || std::is_signed_v>> operator Math::Vector3() { return Get3(); } template || std::is_signed_v>> - operator Math::Vector4_SIMD() { return Get4SIMD(); } - template || std::is_signed_v>> operator Math::Vector3_SIMD() { return Get3SIMD(); } template>> operator Math::Vector4() { return Get4Normalized(); } From 44448515bc6d9a244be81b3a222715ba1df4d0b2 Mon Sep 17 00:00:00 2001 From: Metehan Tuncbilek Date: Mon, 12 Aug 2024 11:56:13 +0300 Subject: [PATCH 5/5] name changes on rgb565 --- openVulkanoCpp/Math/RGB565.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/openVulkanoCpp/Math/RGB565.hpp b/openVulkanoCpp/Math/RGB565.hpp index 5b40395..2e1bf5c 100644 --- a/openVulkanoCpp/Math/RGB565.hpp +++ b/openVulkanoCpp/Math/RGB565.hpp @@ -85,16 +85,16 @@ namespace OpenVulkano::Math } template>> Math::Vector3 Get3Normalized() { - return { GetRFloat(), GetGFloat(), GetBFloat() }; + return { GetR_Normalized(), GetG_Normalized(), GetB_Normalized() }; } template>> Math::Vector4 Get4Normalized() { - return { GetRFloat(), GetGFloat(), GetBFloat(), 1 }; + return { GetR_Normalized(), GetG_Normalized(), GetB_Normalized(), 1 }; } template>> Math::Vector3_SIMD Get3NormalizedSIMD() { - return { GetRFloat(), GetGFloat(), GetBFloat() }; + return { GetR_Normalized(), GetG_Normalized(), GetB_Normalized() }; } void SetR(uint8_t red) { r = Make5(red); } @@ -133,13 +133,13 @@ namespace OpenVulkano::Math b = Make5FromFloat(color.b); } - float GetRFloat() { return Unmake5ToFloat(r); } - float GetGFloat() { return Unmake6ToFloat(g); } - float GetBFloat() { return Unmake5ToFloat(b); } + float GetR_Normalized() { return Unmake5ToFloat(r); } + float GetG_Normalized() { return Unmake6ToFloat(g); } + float GetB_Normalized() { return Unmake5ToFloat(b); } - void SetRNormalized(float red) { r = Make5FromFloat(red); } - void SetGNormalized(float green) { g = Make6FromFloat(green); } - void SetBNormalized(float blue) { b = Make5FromFloat(blue); } + void SetR_Normalized(float red) { r = Make5FromFloat(red); } + void SetG_Normalized(float green) { g = Make6FromFloat(green); } + void SetB_Normalized(float blue) { b = Make5FromFloat(blue); } RGB565& operator=(const RGB565& other) {