@@ -147,7 +147,7 @@ public static void CanSVDInverseFloat3x3With_LinearDependentRow()
147147 public static void CanSVDInverseFloat3x3With_RotatedZeroScale ( )
148148 {
149149 var m102030 = math . float3x3 ( quaternion . Euler ( math . radians ( 10f ) , math . radians ( 20f ) , math . radians ( 30f ) ) ) ;
150- var parent = svd . mulScale ( m102030 , math . float3 ( 1f , 1f , 0f ) ) ;
150+ var parent = math . mulScale ( m102030 , math . float3 ( 1f , 1f , 0f ) ) ;
151151 var mat = math . mul ( parent , m102030 ) ;
152152
153153 ValidateSingular ( mat ) ;
@@ -175,55 +175,11 @@ public static void CanExtractSVDRotationFromFloat3x3With_ZeroScaleXY()
175175 {
176176 var q0 = quaternion . Euler ( math . radians ( 10f ) , math . radians ( 20f ) , math . radians ( 30f ) ) ;
177177 var m0 = math . float3x3 ( q0 ) ;
178- var m0Scaled = svd . mulScale ( m0 , math . float3 ( 1f , 0f , 0f ) ) ;
178+ var m0Scaled = math . mulScale ( m0 , math . float3 ( 1f , 0f , 0f ) ) ;
179179 var q1 = svd . svdRotation ( m0Scaled ) ;
180180 var m1 = math . float3x3 ( q1 ) ;
181181
182182 TestUtils . AreEqual ( 0.0f , math . length ( m0 . c0 - m1 . c0 ) , k_SVDTolerance ) ;
183183 }
184-
185- [ TestCompiler ]
186- public static void mulScale ( )
187- {
188- var tolerance = 1e-5f ;
189-
190- // Random matrix.
191- var m = new float3x3 (
192- 0.891724169254302978516f , 0.156217902898788452148f , 0.492261469364166259766f ,
193- 0.562758803367614746094f , 0.00122839550022035837173f , 0.437942296266555786133f ,
194- 0.2576503753662109375f , 0.200372591614723205566f , 0.515525519847869873047f ) ;
195-
196- // Random scale.
197- var scale = new float3 ( 0.235540181398391723633f , 0.215966641902923583984f , 0.533130943775177001953f ) ;
198- var actual = svd . mulScale ( m , scale ) ;
199- var expected = new float3x3 (
200- 0.210036873817443847656f , 0.0337378568947315216064f , 0.262439817190170288086f ,
201- 0.132552310824394226074f , 0.000265292444964870810509f , 0.233480587601661682129f ,
202- 0.0606870166957378387451f , 0.043273795396089553833f , 0.274842619895935058594f ) ;
203-
204- TestUtils . AreEqual ( expected , actual , 1e-5 ) ;
205- }
206-
207- [ TestCompiler ]
208- public static void scaleMul ( )
209- {
210- var tolerance = 1e-5f ;
211-
212- // Random matrix, same as in mulScale test.
213- var m = new float3x3 (
214- 0.891724169254302978516f , 0.156217902898788452148f , 0.492261469364166259766f ,
215- 0.562758803367614746094f , 0.00122839550022035837173f , 0.437942296266555786133f ,
216- 0.2576503753662109375f , 0.200372591614723205566f , 0.515525519847869873047f ) ;
217-
218- // Random scale, same as in mulScale test.
219- var scale = new float3 ( 0.235540181398391723633f , 0.215966641902923583984f , 0.533130943775177001953f ) ;
220- var actual = svd . scaleMul ( scale , m ) ;
221- var expected = new float3x3 (
222- 0.210036873817443847656f , 0.0367955937981605529785f , 0.115947358310222625732f ,
223- 0.121537126600742340088f , 0.000265292444964870810509f , 0.0945809260010719299316f ,
224- 0.137361392378807067871f , 0.106824830174446105957f , 0.274842619895935058594f ) ;
225-
226- TestUtils . AreEqual ( expected , actual , tolerance ) ;
227- }
228184 }
229185}
0 commit comments