Trait spirv_std::float::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.

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§