mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-01 19:02:22 +01:00
In a few cases, removed the unneeded `&` - this causes a minor slowdown because compiler cannot eliminate those (yet).
6 lines
168 B
Rust
Vendored
6 lines
168 B
Rust
Vendored
// Output the square of a number.
|
|
fn print_square(num: f64) {
|
|
let result = f64::powf(num, 2.0);
|
|
println!("The square of {num:.2} is {result:.2}.");
|
|
}
|