quaver-rs 0.1.0

A Rust library for parsing and analyzing Quaver rhythm game maps
Documentation
use crate::enums::ModIdentifier;

/// Helper functions for mods
pub struct ModHelper;

impl ModHelper {
    /// Get the audio rate from selected mods
    pub fn get_rate_from_mods(mods: ModIdentifier) -> f32 {
        mods.get_rate_from_mods()
    }

    /// Get a speed mod id from a given rate
    pub fn get_mods_from_rate(rate: f32) -> ModIdentifier {
        ModIdentifier::from_rate(rate)
    }

    /// Get mods string representation
    pub fn get_mods_string(mods: ModIdentifier) -> String {
        mods.to_string()
    }
}