pub fn scale_to_unit(&self, other: &Unit) -> Option<Number> {
        if let [(u, 1)] = self.units.as_slice() {
            u.scale_to(other)
        } else if self.is_none() {
            Unit::None.scale_to(other)
        } else {
            // TODO: Handle e.g. em*% as em.
            None
        }
    }
/// Get a scaling factor to convert this unit to another unit.
///
/// Returns None if the units are of different dimension.
Get a scaling factor to convert this unit to another unit.
Returns None if the units are of different dimension.
Get a scaling factor to convert this unit to another unit . Returns None if the units are of different dimension .
pub fn scale_to_unit(&self, other: &Unit) -> Option<Number> {
        if let [(u, 1)] = self.units.as_slice() {
            u.scale_to(other)
        } else if self.is_none() {
            Unit::None.scale_to(other)
        } else {
            // TODO: Handle e.g. em*% as em.
            None
        }
    }
pub fn scale_to_unit ( & self , other : & Unit ) -> Option < Number > { if let [ ( u , 1 ) ] = self . units . as_slice ( ) { u . scale_to ( other ) } else if self . is_none ( ) { Unit :: None . scale_to ( other ) } else { // TODO: Handle e.g. em*% as em. None } }
Get a scaling factor to convert this unit to another unit.
Get a scaling factor to convert this unit to another unit .
&self
other
&Unit