pub trait Scaling<E: EuclideanSpace>: AffineTransformation<E, NonUniformScaling = Self, Translation = Id, Rotation = Id> + SubsetOf<E::RealField> {
// Provided methods
fn to_real(&self) -> E::RealField { ... }
fn from_real(r: E::RealField) -> Option<Self> { ... }
fn powf(&self, n: E::RealField) -> Option<Self> { ... }
fn scale_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self> { ... }
}Expand description
Subgroups of the (signed) uniform scaling group.
Provided Methods§
Sourcefn to_real(&self) -> E::RealField
fn to_real(&self) -> E::RealField
Converts this scaling factor to a real. Same as self.to_superset().
Sourcefn from_real(r: E::RealField) -> Option<Self>
fn from_real(r: E::RealField) -> Option<Self>
Attempts to convert a real to an element of this scaling subgroup. Same as
Self::from_superset(). Returns None if no such scaling is possible for this subgroup.
Sourcefn powf(&self, n: E::RealField) -> Option<Self>
fn powf(&self, n: E::RealField) -> Option<Self>
Raises the scaling to a power. The result must be equivalent to
self.to_superset().powf(n). Returns None if the result is not representable by Self.
Sourcefn scale_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
fn scale_between(a: &E::Coordinates, b: &E::Coordinates) -> Option<Self>
The scaling required to make a have the same norm as b, i.e., |b| = |a| * norm_ratio(a, b).
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.