mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Removed equals-check in percentage->byte conversion
This commit is contained in:
parent
2cb4bbdc83
commit
e70c1c6bb0
@ -75,7 +75,7 @@ namespace RGB.NET.Core
|
|||||||
if (double.IsNaN(percentage)) return 0;
|
if (double.IsNaN(percentage)) return 0;
|
||||||
|
|
||||||
percentage = percentage.Clamp(0, 1.0);
|
percentage = percentage.Clamp(0, 1.0);
|
||||||
return (byte)(percentage.Equals(1.0) ? 255 : percentage * 256.0);
|
return (byte)(percentage >= 1.0 ? 255 : percentage * 256.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user