static double? applyRatio(double? value, double ratio) { return (value == null) ? value : value * ratio; }