WordPress at a glance
function is not described

wc_add_number_precision() WC 3.2.0

Add precision to a number and return a number.

No Hooks.

Return

Int|float. Nothing.

Usage

wc_add_number_precision( $value, $round );
$value(float) (required)
Number to add precision to.
$round(true|false)
If should round after adding precision.

Changelog

Since 3.2.0 Introduced.

Code of wc_add_number_precision() WC 5.2.2

<?php
function wc_add_number_precision( $value, $round = true ) {
	$cent_precision = pow( 10, wc_get_price_decimals() );
	$value          = $value * $cent_precision;
	return $round ? NumberUtil::round( $value, wc_get_rounding_precision() - wc_get_price_decimals() ) : $value;
}