mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-10 20:46:24 +00:00
Added LinearGradientBrush, improved example
This commit is contained in:
1 parent
6f05de450e
commit
f1daa4a766
10 files changed
+236
-20
No files matched your search
@@ -49,8 +49,8 @@ namespace CUE.NET.Helper
|
||||
|
||||
private static byte GetIntColorFromFloat(float f)
|
||||
{
|
||||
float calcF = (float)Math.Max(0.0, Math.Min(1.0, f));
|
||||
return (byte)(calcF == 1.0 ? 255 : calcF * 256.0);
|
||||
float calcF = (float)Math.Max(0f, Math.Min(1f, f));
|
||||
return (byte)(calcF.Equals(1f) ? 255 : calcF * 256.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user