bevy_math::ops

Trait FloatPow

Source
pub trait FloatPow {
    // Required methods
    fn squared(self) -> Self;
    fn cubed(self) -> Self;
}
Expand description

This extension trait covers shortfall in determinacy from the lack of a libm counterpart to f32::powi. Use this for the common small exponents.

Required Methods§

Source

fn squared(self) -> Self

Squares the f32

Source

fn cubed(self) -> Self

Cubes the f32

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.

Implementations on Foreign Types§

Source§

impl FloatPow for f32

Source§

fn squared(self) -> Self

Source§

fn cubed(self) -> Self

Implementors§