Scale Function

Purpose

Multiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value. The return value is rounded up or down to the nearest integer.

Syntax

% = Scale( x, y, d )

x, y, d:iexp

Description

Scale( x, y, d ) calculates ( x * y / d ). The return value is the result of the multiplication and division.

Example

Print Scale(_maxInt, 10, _maxInt)

Print MulDiv(_maxInt, 10, _maxInt)

Remarks

Same as MulDiv API function.

See Also

ScaleX, ScaleY, ScaleToDPi, ScaleXYWHToDpi, WM_DPICHANGED.

{Created by Sjouke Hamstra; Last updated: 09/05/2020 by James Gaite}