()
| 215 | |
| 216 | #[test] |
| 217 | fn normalize() { |
| 218 | let new_vector = vector4::Vector4 { |
| 219 | x: 3.0, |
| 220 | y: 4.0, |
| 221 | z: 5.0, |
| 222 | w: 6.0, |
| 223 | }; |
| 224 | let tar_vector = vector4::Vector4 { |
| 225 | x: 0.323_498_3, |
| 226 | y: 0.431_331_1, |
| 227 | |
| 228 | z: 0.539_163_9, |
| 229 | w: 0.646_996_6, |
| 230 | }; |
| 231 | let res_vector = new_vector.normalize(); |
| 232 | assert_vector4_approx_eq(&tar_vector, &res_vector); |
| 233 | assert_approx_eq!(1.0, res_vector.get_length()); |
| 234 | } |
| 235 | } |
nothing calls this directly
no test coverage detected