# Objective Implements #13647 ## Solution Created two enums, CompassQuadrant and CompassOctant inside compass.rs with impls To and From Dir2. Used dir.to_angle().to_degrees() and matched against the resulting value. I could have skipped to_degrees() and matched against the radian value, but I thought this was more readable. I'm probably wrong lol. ## Testing Tested various dirs to compass variations. --- --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> |
||
|---|---|---|
| .. | ||
| bounding | ||
| primitives | ||
| rects | ||
| sampling | ||
| affine3.rs | ||
| aspect_ratio.rs | ||
| common_traits.rs | ||
| compass.rs | ||
| cubic_splines.rs | ||
| direction.rs | ||
| float_ord.rs | ||
| lib.rs | ||
| ray.rs | ||
| rotation2d.rs | ||