Function linear_to_db
pub fn linear_to_db(lin: f64) -> f64Expand description
Converts from linear energy to decibels (audio). Since volume is not normally linear, this can be used to implement volume sliders that behave as expected.
Example: Change the Master bus’s volume through a Slider node, which ranges from 0.0 to 1.0:
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value))