@@ -81,23 +81,23 @@ public static void ConstructWithCoefficients_NonUnitLengthNormal()
8181 [ TestCompiler ]
8282 public static void ConstructWithNormalAndPointInPlane_NegativeDistance ( )
8383 {
84- var n = float3 . up ;
85- var pointInPlane = float3 . up ;
84+ var n = math . up ( ) ;
85+ var pointInPlane = math . up ( ) ;
8686 var p = new Plane ( n , pointInPlane ) ;
8787
88- TestUtils . AreEqual ( new float4 ( float3 . up , - 1.0f ) , p . NormalAndDistance ) ;
88+ TestUtils . AreEqual ( new float4 ( math . up ( ) , - 1.0f ) , p . NormalAndDistance ) ;
8989 TestUtils . AreEqual ( n , p . Normal ) ;
9090 TestUtils . AreEqual ( - 1.0f , p . Distance ) ;
9191 }
9292
9393 [ TestCompiler ]
9494 public static void ConstructWithNormalAndPointInPlane_PositiveDistance ( )
9595 {
96- var n = float3 . down ;
97- var pointInPlane = float3 . up ;
96+ var n = math . down ( ) ;
97+ var pointInPlane = math . up ( ) ;
9898 var p = new Plane ( n , pointInPlane ) ;
9999
100- TestUtils . AreEqual ( new float4 ( float3 . down , 1.0f ) , p . NormalAndDistance ) ;
100+ TestUtils . AreEqual ( new float4 ( math . down ( ) , 1.0f ) , p . NormalAndDistance ) ;
101101 TestUtils . AreEqual ( n , p . Normal ) ;
102102 TestUtils . AreEqual ( 1.0f , p . Distance ) ;
103103 }
@@ -158,29 +158,29 @@ public static void SignedDistanceToPointTrivial()
158158 var p = new Plane ( math . up ( ) , 0.0f ) ;
159159
160160 TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( float3 . zero ) ) ;
161- TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( float3 . left ) ) ;
162- TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( float3 . right ) ) ;
163- TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( float3 . forward ) ) ;
164- TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( float3 . back ) ) ;
165- TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( float3 . up ) ) ;
166- TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( float3 . up + float3 . left ) ) ;
167- TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( float3 . up + float3 . right ) ) ;
168- TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( float3 . up + float3 . back ) ) ;
169- TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( float3 . up + float3 . forward ) ) ;
170- TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( float3 . down ) ) ;
171- TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( float3 . down + float3 . left ) ) ;
172- TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( float3 . down + float3 . right ) ) ;
173- TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( float3 . down + float3 . back ) ) ;
174- TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( float3 . down + float3 . forward ) ) ;
161+ TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( math . left ( ) ) ) ;
162+ TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( math . right ( ) ) ) ;
163+ TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( math . forward ( ) ) ) ;
164+ TestUtils . AreEqual ( 0.0f , p . SignedDistanceToPoint ( math . back ( ) ) ) ;
165+ TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( math . up ( ) ) ) ;
166+ TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( math . up ( ) + math . left ( ) ) ) ;
167+ TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( math . up ( ) + math . right ( ) ) ) ;
168+ TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( math . up ( ) + math . back ( ) ) ) ;
169+ TestUtils . AreEqual ( 1.0f , p . SignedDistanceToPoint ( math . up ( ) + math . forward ( ) ) ) ;
170+ TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( math . down ( ) ) ) ;
171+ TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( math . down ( ) + math . left ( ) ) ) ;
172+ TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( math . down ( ) + math . right ( ) ) ) ;
173+ TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( math . down ( ) + math . back ( ) ) ) ;
174+ TestUtils . AreEqual ( - 1.0f , p . SignedDistanceToPoint ( math . down ( ) + math . forward ( ) ) ) ;
175175 }
176176
177177 [ TestCompiler ]
178178 public static void ProjectionTrivial ( )
179179 {
180- var p = new Plane ( float3 . up , 0.0f ) ;
181- var expected = float3 . left + float3 . forward ;
180+ var p = new Plane ( math . up ( ) , 0.0f ) ;
181+ var expected = math . left ( ) + math . forward ( ) ;
182182
183- TestUtils . AreEqual ( expected , p . Projection ( float3 . up + expected ) ) ;
183+ TestUtils . AreEqual ( expected , p . Projection ( math . up ( ) + expected ) ) ;
184184 }
185185
186186 [ TestCompiler ]
0 commit comments