1#![feature(decl_macro)]
60#![feature(stmt_expr_attributes)]
61#![cfg_attr(test, feature(test))]
62#![cfg_attr(feature = "derive_serdes", feature(cfg_eval))]
63
64pub use vek::approx;
65pub use vek::num_traits as num;
66pub use vek;
67
68pub mod data;
69pub mod geometry;
70pub mod algebra;
71
72mod fixed;
73mod traits;
74mod types;
75
76pub use self::fixed::*;
77pub use self::traits::*;
78pub use self::types::*;
79
80pub const COMPONENT_INDEX_X : usize = 0;
82pub const COMPONENT_INDEX_Y : usize = 1;
84pub const COMPONENT_INDEX_Z : usize = 2;
86pub const COMPONENT_INDEX_W : usize = 3;
88
89
90#[doc(hidden)]
92#[macro_export]
93macro_rules! show {
94 ($e:expr) => { println!("{}: {:?}", stringify!($e), $e); }
95}
96
97#[doc(hidden)]
99#[macro_export]
100macro_rules! display {
101 ($e:expr) => { println!("{}: {}", stringify!($e), $e); }
102}
103
104pub fn report_sizes() {
106 use std::mem::size_of;
107 println!("report sizes...");
108 show!(size_of::<Vector2 <f32>>());
109 show!(size_of::<Vector3 <f32>>());
110 show!(size_of::<Vector4 <f32>>());
111 show!(size_of::<Matrix2 <f32>>());
112 show!(size_of::<Matrix3 <f32>>());
113 show!(size_of::<Rotation2 <f32>>());
114 show!(size_of::<Rotation3 <f32>>());
115 show!(size_of::<AffineMap <f32, Point3 <f32>, Point3 <f32>, Matrix3 <f32>>>());
116 show!(size_of::<AffineMap <f32, Point4 <f32>, Point4 <f32>, Matrix4 <f32>>>());
117 println!("...report sizes");
118}