Table of Contents

Method IsScaleFactorCloseToOne

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

IsScaleFactorCloseToOne(float)

Determines whether the specified DPI scale factor is effectively equal to 1.0 within a small tolerance.

public static bool IsScaleFactorCloseToOne(float dpiScale)

Parameters

dpiScale float

The DPI scale factor to evaluate. Typically, a value of 1.0 indicates no scaling.

Returns

bool

true if the scale factor is within 0.001 of 1.0; otherwise, false.

Remarks

This method is useful for checking if DPI scaling is effectively disabled or negligible, accounting for minor floating-point inaccuracies.