spirv_std::float

Trait Float

Source
pub unsafe trait Float:
    Float
    + Scalar
    + Default {
    const WIDTH: usize;
}
Expand description

Abstract trait representing a SPIR-V floating point type.

§Safety

Implementing this trait on non-primitive-float types breaks assumptions of other unsafe code, and should not be done.

Required Associated Constants§

Source

const WIDTH: usize

Width of the float, in bits.

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 Float for f32

Source§

const WIDTH: usize = 32usize

Source§

impl Float for f64

Source§

const WIDTH: usize = 64usize

Implementors§