/** * Format value as parts list * * @param float $value Value * * @return array */ public function formatParts($value) { return \XLite\Logic\Math::getInstance()->formatParts($value, $this); }
/** * Adjust float $value with $precision and within limits ($min and $max) * * @param float $value Amount * @param int $precision Precision * @param float $min Min amount * @param float $max Max amount * * @return float */ public static function adjustFloatValue($value, $precision, $min, $max) { return min($max, max($min, \XLite\Logic\Math::getInstance()->round($value, $precision))); }