~xdavidwu/motion-control

c0a43d2b77457b53674403de9b703741a043bfdd — xdavidwu 2 years ago b48f132
math::quaternion: remove early test leftovers
1 files changed, 0 insertions(+), 10 deletions(-)

M math/quaternion/conversion.ha
M math/quaternion/conversion.ha => math/quaternion/conversion.ha +0 -10
@@ 15,13 15,3 @@ export fn to_euler(q: quaternion) (f64, f64, f64) = {
		math::atanf64(2.0 * (q.0 * q.3 + q.1 * q.2) / (1.0 - 2.0 * (q.2 * q.2 + q.3 * q.3))),
	);
};

@test fn conversion() void = {
	let euler = (2.0 / 180.0 * math::PI, 3.0 / 180.0 * math::PI, 4.0 / 180.0 * math::PI);
	fmt::println(euler.0, euler.1, euler.2)!;
	let angle = math::sqrtf64(euler.0 * euler.0 + euler.1 * euler.1 + euler.2 * euler.2);
	let axis = (euler.0 / angle, euler.1 / angle, euler.2 / angle);
	let q = from_axis_angle(axis, angle);
	let res = to_euler(q);
	fmt::println(res.0, res.1, res.2)!;
};