make_vecX from color and color32

This commit is contained in:
2019-08-17 10:59:34 +07:00
parent 467da73019
commit 2eecc0ae6e
6 changed files with 30 additions and 0 deletions

View File

@@ -139,6 +139,14 @@ namespace e2d
namespace e2d
{
vec3<f32> make_vec3(const color& c) noexcept {
return make_vec3(c.r, c.g, c.b);
}
vec4<f32> make_vec4(const color& c) noexcept {
return make_vec4(c.r, c.g, c.b, c.a);
}
//
// color (<,==,!=) color
//

View File

@@ -139,6 +139,14 @@ namespace e2d
namespace e2d
{
vec3<u8> make_vec3(const color32& c) noexcept {
return make_vec3(c.r, c.g, c.b);
}
vec4<u8> make_vec4(const color32& c) noexcept {
return make_vec4(c.r, c.g, c.b, c.a);
}
//
// color32 (<,==,!=) color32
//