W3cubDocs

/Rust

Constant std::f32::DIGITS

pub const DIGITS: u32 = f32::DIGITS; // 6u32

Approximate number of significant digits in base 10. Use f32::DIGITS instead.

Examples

// deprecated way
let d = std::f32::DIGITS;

// intended way
let d = f32::DIGITS;

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/f32/constant.DIGITS.html