Photo past times David Kovalenko at Unsplash
Took me an hr or in addition to hence to figure out why something I had ported from C# to PowerShell was non working, in addition to the culprit is how casting of decimals to bytes work.
In .Net: (byte)4.6 = 4, important it truncates
In PowerShell [byte]4.6 = 5, important it rounds up
The solution is to role [Math]::Floor instead inward PowerShell, which of class industrial plant fine inward .Net every 2nd well.
Thanks for reading : Programmatic Nuance Inwards .Net In Addition To Powershell Which Tin Wreck Havoc