1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// fisica::units::velocity
//
//!
//
use crate;
use crateDirection;
/// How fast something is moving in a particular direction, in `m/s`.
///
/// This is a vector unit.
/// # `Velocity` formulas
impl_vector_methods_2units!;
// #[cfg(test)]
// mod tests {
// use {super::*, float_eq::assert_float_eq};
//
// /// Checks the constants are defined as expected.
// #[test]
// fn speed_constants() {
// //assert_float_eq!(0.0000000000162, Length::PLANCK.as_ym(), r2nd <= Magnitude::EPSILON);
// }
//
// /// Checks the formulas behave as expected.
// #[test]
// fn speed_formulas() {
// // Distance, Speed & Time
// let speed = Speed::from_distance_time(Distance::in_m(300.), Time(25.));
// assert_float_eq!(12., speed.m, r2nd <= Magnitude::EPSILON);
// assert_float_eq!(25., speed.calc_time(Length(300.)).m, r2nd <= Magnitude::EPSILON);
// assert_float_eq!(300., speed.calc_distance(Time(25.)).m, r2nd <= Magnitude::EPSILON);
// }
// }