7ecc718f5d
app -> app-desktop-macos, presets -> app-presets, server -> remote-server, daw-config-reaper -> osc-config-daw, plugin-reaper-realearn -> plugin-reaper-relearn. Updated run.py and presets.py path references accordingly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
10 lines
323 B
Rust
10 lines
323 B
Rust
pub fn format_percentage_without_unit(value: f64) -> String {
|
|
let percentage = value * 100.0;
|
|
format!("{percentage:.4}")
|
|
}
|
|
|
|
pub fn parse_percentage_without_unit(text: &str) -> Result<f64, &'static str> {
|
|
let percentage: f64 = text.parse().map_err(|_| "not a valid decimal value")?;
|
|
Ok(percentage / 100.0)
|
|
}
|