Table of Contents

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

value int

The value to scale.

multiplier int

The multiplier.

divisor int

The divisor. Must not be zero.

Returns

int

The scaled, rounded value.

Exceptions

DivideByZeroException

divisor is zero.

OverflowException

An intermediate product or the result overflows.