avian2d::math

Trait MatExt

Source
pub trait MatExt {
    // Required method
    fn inverse_or_zero(self) -> Self;
}
Expand description

An extension trait for matrix types.

Required Methods§

Source

fn inverse_or_zero(self) -> Self

Computes the inverse of self if self is not zero, and returns zero otherwise to avoid division by zero.

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 MatExt for Mat3

Source§

fn inverse_or_zero(self) -> Self

Source§

impl MatExt for Mat2

Source§

fn inverse_or_zero(self) -> Self

Source§

impl MatExt for DMat2

Source§

fn inverse_or_zero(self) -> Self

Source§

impl MatExt for DMat3

Source§

fn inverse_or_zero(self) -> Self

Implementors§