mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-16 13:44:16 +01:00
Merge pull request #1144 from kalilistic/bytecolor
This commit is contained in:
commit
90ee6af1d8
1 changed files with 6 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using FFXIVClientStructs.FFXIV.Client.Graphics;
|
||||||
|
|
||||||
namespace Dalamud.Utility.Numerics;
|
namespace Dalamud.Utility.Numerics;
|
||||||
|
|
||||||
|
|
@ -53,4 +54,9 @@ public static class VectorExtensions
|
||||||
{
|
{
|
||||||
return new Vector2(v.X, y);
|
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) };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue