DoubleAspectRatioExtensions extension

Extension method for converting a decimal ratio into a simplified integer aspect-ratio pair.

Lives in its own file (separate from DoubleExtensions) so the core formatting extension stays within the project's per-file size limit; it reuses DoubleExtensions.hasDecimals and IntUtils.findGreatestCommonDenominator.

on

Methods

toAspectRatio() → (int, int)?

Available on double, provided by the DoubleAspectRatioExtensions extension

Converts this decimal ratio into a GCD-simplified integer pair, or null when no pair can be derived.