For given floating point numbers x and a, I would like to compute r (and n) such that x = a*n + r . In C/C++ this function is called fmod. However I do not see a convenient function in .NET. Math.DivRem is only for integers …
For given floating point numbers x and a , I would like to compute
Share
I think you can just use
%for floats as well.r = x % a"Arithmetic operators (C# reference)":