WordPress at a glance
function is not described

wc_legacy_round_half_down() WC 3.2.6

Round half down in PHP 5.2.

No Hooks.

Return

float. Nothing.

Usage

wc_legacy_round_half_down( $value, $precision );
$value(float) (required)
Value to round.
$precision(int) (required)
Precision to round down to.

Changelog

Since 3.2.6 Introduced.

Code of wc_legacy_round_half_down() WC 5.3.0

<?php
function wc_legacy_round_half_down( $value, $precision ) {
	$value = wc_float_to_string( $value );

	if ( false !== strstr( $value, '.' ) ) {
		$value = explode( '.', $value );

		if ( strlen( $value[1] ) > $precision && substr( $value[1], -1 ) === '5' ) {
			$value[1] = substr( $value[1], 0, -1 ) . '4';
		}

		$value = implode( '.', $value );
	}

	return NumberUtil::round( floatval( $value ), $precision );
}