Merge pull request #1144 from kalilistic/bytecolor

This commit is contained in:
goat 2023-03-01 21:53:23 +01:00 committed by GitHub
commit 90ee6af1d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
using FFXIVClientStructs.FFXIV.Client.Graphics;
namespace Dalamud.Utility.Numerics;
@ -53,4 +54,9 @@ public static class VectorExtensions
{
return new Vector2(v.X, y);
}
public static ByteColor ToByteColor(this Vector4 v)
{
return new ByteColor { A = (byte)(v.W * 255), R = (byte)(v.X * 255), G = (byte)(v.Y * 255), B = (byte)(v.Z * 255) };
}
}