rust-gpu/tests/ui/lang/f32/signum.rs
2021-03-23 09:30:24 +01:00

10 lines
156 B
Rust

// Test that `signum` works.
// build-pass
use spirv_std::num_traits::Float;
#[spirv(fragment)]
pub fn main(i: f32, o: &mut f32) {
*o = i.signum();
}