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

Object Safety§

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§