Function tauri_runtime::window::dpi::validate_scale_factor
source · pub fn validate_scale_factor(scale_factor: f64) -> bool
Expand description
Checks that the scale factor is a normal positive f64
.
All functions that take a scale factor assert that this will return true
. If you’re sourcing scale factors from
anywhere other than tao, it’s recommended to validate them using this function before passing them to tao;
otherwise, you risk panics.