Trait Normalize

Source
pub trait Normalize {
    // Required method
    fn normalize(x: f64, y: f64) -> f64;
}
Expand description

Used for the N type parameter of CssLength<N: Normalize, V: Validate>.

Required Methods§

Source

fn normalize(x: f64, y: f64) -> f64

Computes an orientation-based scaling factor.

This is used in the CssLength::to_user method to resolve lengths with percentage units; they need to be resolved with respect to the width, height, or normalized diagonal of the current viewport.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§