switch to using `half` for f16 implementation
[vector-math.git] / src / lib.rs
index 088d074ea417f0c9340291e786924fe69622497d..2f64c51b340ce1152fd70dc73cfe039da5543d22 100644 (file)
@@ -2,6 +2,10 @@
 
 pub mod traits;
 
-#[derive(Clone, Copy, Debug, Default, Hash)]
-#[repr(transparent)]
-pub struct F16(pub u16);
+#[cfg(feature = "f16")]
+pub use half::f16;
+
+#[cfg(not(feature = "f16"))]
+#[allow(non_camel_case_types)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Debug, Hash)]
+pub enum f16 {}