@@ -791,7 +791,7 @@ where
791791 ///
792792 /// Since vectors do not include roll information, the desired roll must be passed in. It's
793793 /// worth reading the documentation on [`Orientation`] for a reminder about the meaning of roll
794- /// here. Very briefly, it is intrinsic, and 0º roll means the object's positive Z axis is
794+ /// here. Very briefly, it is intrinsic, and 0° roll means the object's positive Z axis is
795795 /// aligned with `In`'s positive Z axis.
796796 ///
797797 /// Returns `None` if the vector has zero length, as the yaw is then ill-defined.
@@ -800,7 +800,7 @@ where
800800 #[ must_use]
801801 pub fn orientation_at_origin ( & self , roll : impl Into < Angle > ) -> Option < Orientation < In > > {
802802 // The vector is effectively an axis-angle representation of the Tait-Bryan orientation
803- // we're after (with the angle of rotation being 0º ). But, when angle is 0º , the axis-angle
803+ // we're after (with the angle of rotation being 0° ). But, when angle is 0° , the axis-angle
804804 // representation ends up being a noop from what I can tell. Instead, we compute this from
805805 // first principles. Note that we cast to the raw length, but that's okay since we only
806806 // care about the relative magnitudes for these as we're computing angles.
@@ -814,14 +814,14 @@ where
814814 }
815815
816816 // Per `Orientation::from_tait_bryan_angles`, yaw is rotation about the Z axis with an
817- // object at 0º yaw facing along the positive X axis. Thus, it is rotation on the XY plane
817+ // object at 0° yaw facing along the positive X axis. Thus, it is rotation on the XY plane
818818 // (and uses only the x and y coordinates). Positive yaw is counter-clockwise rotation
819819 // about Z (ie, towards +Y from +X), and thus we want the sin of the angle between X and Y
820820 // with no sign flipping.
821821 //
822822 // Also note that atan2 guarantees that it returns 0 if both components are 0.
823823 let yaw = y. atan2 ( x) ;
824- // Pitch is the rotation about the Y axis, with 0º pitch being aligned with the yaw axis
824+ // Pitch is the rotation about the Y axis, with 0° pitch being aligned with the yaw axis
825825 // (since we're using intrinsic rotations). Per the right-hand rule, positive pitch
826826 // rotates from +X toward -Z, so we negate z to get the correct sign.
827827 let pitch = ( -z) . atan2 ( ( x. powi ( P2 :: new ( ) ) + y. powi ( P2 :: new ( ) ) ) . sqrt ( ) ) ;
@@ -1445,7 +1445,7 @@ mod tests {
14451445
14461446 #[ test]
14471447 fn orientation_at_origin_positive_x_axis ( ) {
1448- // Vector pointing along +X should have yaw=0º , pitch=0º
1448+ // Vector pointing along +X should have yaw=0° , pitch=0°
14491449 let v = vector ! ( x = m( 1.0 ) , y = m( 0.0 ) , z = m( 0.0 ) ; in TestXyz ) ;
14501450 let orientation = v
14511451 . orientation_at_origin ( Angle :: ZERO )
@@ -1459,7 +1459,7 @@ mod tests {
14591459
14601460 #[ test]
14611461 fn orientation_at_origin_positive_y_axis ( ) {
1462- // Vector pointing along +Y should have yaw=90º , pitch=0º
1462+ // Vector pointing along +Y should have yaw=90° , pitch=0°
14631463 let v = vector ! ( x = m( 0.0 ) , y = m( 1.0 ) , z = m( 0.0 ) ; in TestXyz ) ;
14641464 let orientation = v
14651465 . orientation_at_origin ( Angle :: ZERO )
@@ -1473,7 +1473,7 @@ mod tests {
14731473
14741474 #[ test]
14751475 fn orientation_at_origin_positive_z_axis ( ) {
1476- // Vector pointing along +Z should have yaw=0º (arbitrary), pitch=-90º
1476+ // Vector pointing along +Z should have yaw=0° (arbitrary), pitch=-90°
14771477 let v = vector ! ( x = m( 0.0 ) , y = m( 0.0 ) , z = m( 1.0 ) ; in TestXyz ) ;
14781478 let orientation = v
14791479 . orientation_at_origin ( Angle :: ZERO )
@@ -1487,22 +1487,22 @@ mod tests {
14871487
14881488 #[ test]
14891489 fn orientation_at_origin_negative_x_axis ( ) {
1490- // Vector pointing along -X should have yaw=180º or -180º , pitch=0º
1490+ // Vector pointing along -X should have yaw=180° or -180° , pitch=0°
14911491 let v = vector ! ( x = m( -1.0 ) , y = m( 0.0 ) , z = m( 0.0 ) ; in TestXyz ) ;
14921492 let orientation = v
14931493 . orientation_at_origin ( Angle :: ZERO )
14941494 . expect ( "non-zero vector" ) ;
14951495 let ( yaw, pitch, roll) = orientation. to_tait_bryan_angles ( ) ;
14961496
1497- // atan2(0, -1) = 180º or -180º depending on convention
1497+ // atan2(0, -1) = 180° or -180° depending on convention
14981498 assert_abs_diff_eq ! ( yaw. get:: <degree>( ) . abs( ) , 180.0 , epsilon = 1e-10 ) ;
14991499 assert_abs_diff_eq ! ( pitch. get:: <degree>( ) , 0.0 , epsilon = 1e-10 ) ;
15001500 assert_abs_diff_eq ! ( roll. get:: <degree>( ) , 0.0 , epsilon = 1e-10 ) ;
15011501 }
15021502
15031503 #[ test]
15041504 fn orientation_at_origin_45_degree_xy_plane ( ) {
1505- // Vector at 45º in XY plane should have yaw=45º , pitch=0º
1505+ // Vector at 45° in XY plane should have yaw=45° , pitch=0°
15061506 let v = vector ! ( x = m( 1.0 ) , y = m( 1.0 ) , z = m( 0.0 ) ; in TestXyz ) ;
15071507 let orientation = v
15081508 . orientation_at_origin ( Angle :: ZERO )
@@ -1516,7 +1516,7 @@ mod tests {
15161516
15171517 #[ test]
15181518 fn orientation_at_origin_45_degree_xz_plane ( ) {
1519- // Vector at 45º in XZ plane should have yaw=0º , pitch=-45º
1519+ // Vector at 45° in XZ plane should have yaw=0° , pitch=-45°
15201520 let v = vector ! ( x = m( 1.0 ) , y = m( 0.0 ) , z = m( 1.0 ) ; in TestXyz ) ;
15211521 let orientation = v
15221522 . orientation_at_origin ( Angle :: ZERO )
@@ -1531,8 +1531,8 @@ mod tests {
15311531 #[ test]
15321532 fn orientation_at_origin_general_3d_vector ( ) {
15331533 // Vector at (3, 4, 5) - verify the full computation
1534- // Expected yaw = atan2(4, 3) ≈ 53.13º
1535- // Expected pitch = atan2(-5, sqrt(3² + 4²)) = atan2(-5, 5) = -45º
1534+ // Expected yaw = atan2(4, 3) ≈ 53.13°
1535+ // Expected pitch = atan2(-5, sqrt(3² + 4²)) = atan2(-5, 5) = -45°
15361536 let v = vector ! ( x = m( 3.0 ) , y = m( 4.0 ) , z = m( 5.0 ) ; in TestXyz ) ;
15371537 let orientation = v
15381538 . orientation_at_origin ( Angle :: ZERO )
@@ -1561,7 +1561,7 @@ mod tests {
15611561 // - positive yaw is from-north-towards-east
15621562 // - positive pitch is towards -Z (as always), so "up"
15631563 //
1564- // so a 45º -nose-up east vector should have yaw=90º and pitch=45º
1564+ // so a 45° -nose-up east vector should have yaw=90° and pitch=45°
15651565 let v = vector ! ( n = m( 0.0 ) , e = m( 1.0 ) , d = m( -1.0 ) ; in TestNed ) ;
15661566 let orientation = v
15671567 . orientation_at_origin ( Angle :: ZERO )
@@ -1582,7 +1582,7 @@ mod tests {
15821582 // - positive yaw is from-east-towards-north
15831583 // - positive pitch is towards -Z (as always), so "down"
15841584 //
1585- // so a 45º -nose-up north vector should have yaw=90º and pitch=-45º
1585+ // so a 45° -nose-up north vector should have yaw=90° and pitch=-45°
15861586 let v = vector ! ( e = m( 0.0 ) , n = m( 1.0 ) , u = m( 1.0 ) ; in TestEnu ) ;
15871587 let orientation = v
15881588 . orientation_at_origin ( Angle :: ZERO )
0 commit comments