Method MulDivRound32
- Namespace
- DocWright.Core.Primitives
- Assembly
- DocWright.Core.dll
MulDivRound32(int, int, int)
Computes value * multiplier / divisor in integer arithmetic with
round-half-away-from-zero, returning a 32-bit result.
public static int MulDivRound32(int value, int multiplier, int divisor)
Parameters
valueintThe value to scale.
multiplierintThe multiplier.
divisorintThe divisor. Must not be zero.
Returns
- int
The scaled, rounded value.
Exceptions
- DivideByZeroException
divisoris zero.- OverflowException
An intermediate product or the result overflows.