@@ -563,8 +563,8 @@ impl<S: BaseFloat> VectorSpace for Matrix4<S> {
563563}
564564
565565impl < S : BaseFloat > Matrix for Matrix2 < S > {
566- type Column = Vector2 < S > ;
567566 type Row = Vector2 < S > ;
567+ type Column = Vector2 < S > ;
568568 type Transpose = Matrix2 < S > ;
569569
570570 #[ inline]
@@ -661,8 +661,8 @@ impl<S: BaseFloat> SquareMatrix for Matrix2<S> {
661661}
662662
663663impl < S : BaseFloat > Matrix for Matrix3 < S > {
664- type Column = Vector3 < S > ;
665664 type Row = Vector3 < S > ;
665+ type Column = Vector3 < S > ;
666666 type Transpose = Matrix3 < S > ;
667667
668668 #[ inline]
@@ -776,8 +776,8 @@ impl<S: BaseFloat> SquareMatrix for Matrix3<S> {
776776}
777777
778778impl < S : BaseFloat > Matrix for Matrix4 < S > {
779- type Column = Vector4 < S > ;
780779 type Row = Vector4 < S > ;
780+ type Column = Vector4 < S > ;
781781 type Transpose = Matrix4 < S > ;
782782
783783 #[ inline]
@@ -1092,13 +1092,13 @@ impl<S: BaseFloat> Transform<Point2<S>> for Matrix3<S> {
10921092 Matrix3 :: from ( Matrix2 :: look_at ( dir, up) )
10931093 }
10941094
1095- fn look_at_lh ( eye : Point2 < S > , center : Point2 < S > , up : Vector2 < S > ) -> Matrix3 < S > {
1096- let dir = center - eye ;
1095+ fn look_at_rh ( eye : Point2 < S > , center : Point2 < S > , up : Vector2 < S > ) -> Matrix3 < S > {
1096+ let dir = eye - center ;
10971097 Matrix3 :: from ( Matrix2 :: look_at ( dir, up) )
10981098 }
10991099
1100- fn look_at_rh ( eye : Point2 < S > , center : Point2 < S > , up : Vector2 < S > ) -> Matrix3 < S > {
1101- let dir = eye - center ;
1100+ fn look_at_lh ( eye : Point2 < S > , center : Point2 < S > , up : Vector2 < S > ) -> Matrix3 < S > {
1101+ let dir = center - eye ;
11021102 Matrix3 :: from ( Matrix2 :: look_at ( dir, up) )
11031103 }
11041104
@@ -1125,14 +1125,14 @@ impl<S: BaseFloat> Transform<Point3<S>> for Matrix3<S> {
11251125 Matrix3 :: look_to_lh ( dir, up)
11261126 }
11271127
1128- fn look_at_lh ( eye : Point3 < S > , center : Point3 < S > , up : Vector3 < S > ) -> Matrix3 < S > {
1128+ fn look_at_rh ( eye : Point3 < S > , center : Point3 < S > , up : Vector3 < S > ) -> Matrix3 < S > {
11291129 let dir = center - eye;
1130- Matrix3 :: look_to_lh ( dir, up)
1130+ Matrix3 :: look_to_rh ( dir, up)
11311131 }
11321132
1133- fn look_at_rh ( eye : Point3 < S > , center : Point3 < S > , up : Vector3 < S > ) -> Matrix3 < S > {
1133+ fn look_at_lh ( eye : Point3 < S > , center : Point3 < S > , up : Vector3 < S > ) -> Matrix3 < S > {
11341134 let dir = center - eye;
1135- Matrix3 :: look_to_rh ( dir, up)
1135+ Matrix3 :: look_to_lh ( dir, up)
11361136 }
11371137
11381138 fn transform_vector ( & self , vec : Vector3 < S > ) -> Vector3 < S > {
@@ -1157,14 +1157,14 @@ impl<S: BaseFloat> Transform<Point3<S>> for Matrix4<S> {
11571157 Matrix4 :: look_at_rh ( eye, center, up)
11581158 }
11591159
1160- fn look_at_lh ( eye : Point3 < S > , center : Point3 < S > , up : Vector3 < S > ) -> Matrix4 < S > {
1161- Matrix4 :: look_at_lh ( eye, center, up)
1162- }
1163-
11641160 fn look_at_rh ( eye : Point3 < S > , center : Point3 < S > , up : Vector3 < S > ) -> Matrix4 < S > {
11651161 Matrix4 :: look_at_rh ( eye, center, up)
11661162 }
11671163
1164+ fn look_at_lh ( eye : Point3 < S > , center : Point3 < S > , up : Vector3 < S > ) -> Matrix4 < S > {
1165+ Matrix4 :: look_at_lh ( eye, center, up)
1166+ }
1167+
11681168 fn transform_vector ( & self , vec : Vector3 < S > ) -> Vector3 < S > {
11691169 ( self * vec. extend ( S :: zero ( ) ) ) . truncate ( )
11701170 }
0 commit comments