Table of Contents

TTMSFNCUtils.MulDivInt Method

Multiplies an integer by a numerator and divides by a denominator with rounding.

API unit family: TMSFNCUtils Declaring type: TTMSFNCUtils

Syntax

class function MulDivInt(nNumber, nNumerator, nDenominator: Integer): Integer; overload;

Parameters

Name Description
nNumber Base value to scale.
nNumerator Multiplier numerator.
nDenominator Divider denominator.

Returns

The rounded scaled value, or -1 when nDenominator is 0.