Function scale_data_value

Source
pub fn scale_data_value(x: U256, decimals: usize, precision: usize) -> f64
Expand description

Scale a U256 value representing a fixed number of decimals into a value that fits a f64 (discarding some precision)

ยงArguments

  • x - U256 value
  • decimals - Number of decimals represented by x
  • precision - Desired precision of the output