@@ -1097,39 +1097,25 @@ impl Transform {
10971097 return Some ( Matrix3d :: scale ( x. into ( ) , y. into ( ) , z. into ( ) ) )
10981098 }
10991099 Transform :: Rotate ( angle) | Transform :: RotateZ ( angle) => {
1100- if let Some ( a) = angle. to_radians ( ) {
1101- return Some ( Matrix3d :: rotate ( 0.0 , 0.0 , 1.0 , a) )
1102- }
1100+ return Some ( Matrix3d :: rotate ( 0.0 , 0.0 , 1.0 , angle. to_radians ( ) ) )
11031101 }
11041102 Transform :: RotateX ( angle) => {
1105- if let Some ( a) = angle. to_radians ( ) {
1106- return Some ( Matrix3d :: rotate ( 1.0 , 0.0 , 0.0 , a) )
1107- }
1103+ return Some ( Matrix3d :: rotate ( 1.0 , 0.0 , 0.0 , angle. to_radians ( ) ) )
11081104 }
11091105 Transform :: RotateY ( angle) => {
1110- if let Some ( a) = angle. to_radians ( ) {
1111- return Some ( Matrix3d :: rotate ( 0.0 , 1.0 , 0.0 , a) )
1112- }
1106+ return Some ( Matrix3d :: rotate ( 0.0 , 1.0 , 0.0 , angle. to_radians ( ) ) )
11131107 }
11141108 Transform :: Rotate3d ( x, y, z, angle) => {
1115- if let Some ( a) = angle. to_radians ( ) {
1116- return Some ( Matrix3d :: rotate ( * x, * y, * z, a) )
1117- }
1109+ return Some ( Matrix3d :: rotate ( * x, * y, * z, angle. to_radians ( ) ) )
11181110 }
11191111 Transform :: Skew ( x, y) => {
1120- if let ( Some ( x) , Some ( y) ) = ( x. to_radians ( ) , y. to_radians ( ) ) {
1121- return Some ( Matrix3d :: skew ( x, y) )
1122- }
1112+ return Some ( Matrix3d :: skew ( x. to_radians ( ) , y. to_radians ( ) ) )
11231113 }
11241114 Transform :: SkewX ( x) => {
1125- if let Some ( x) = x. to_radians ( ) {
1126- return Some ( Matrix3d :: skew ( x, 0.0 ) )
1127- }
1115+ return Some ( Matrix3d :: skew ( x. to_radians ( ) , 0.0 ) )
11281116 }
11291117 Transform :: SkewY ( y) => {
1130- if let Some ( y) = y. to_radians ( ) {
1131- return Some ( Matrix3d :: skew ( 0.0 , y) )
1132- }
1118+ return Some ( Matrix3d :: skew ( 0.0 , y. to_radians ( ) ) )
11331119 }
11341120 Transform :: Perspective ( len) => {
11351121 if let Some ( len) = len. to_px ( ) {
0 commit comments