@@ -42,7 +42,7 @@ private struct VectorBasis<T>
4242 /// <param name="cameraForwardVector">The forward vector of the camera.</param>
4343 /// <returns>The created billboard matrix</returns>
4444 public static Matrix3X3 < T > CreateBillboard < T > ( Vector3D < T > objectPosition , Vector3D < T > cameraPosition , Vector3D < T > cameraUpVector , Vector3D < T > cameraForwardVector )
45- where T : IRootFunctions < T >
45+ where T : INumber < T > , IRootFunctions < T >
4646 {
4747 Vector3D < T > zaxis = objectPosition - cameraPosition ;
4848 var norm = zaxis . LengthSquared ;
@@ -67,7 +67,7 @@ public static Matrix3X3<T> CreateBillboard<T>(Vector3D<T> objectPosition, Vector
6767 /// <param name="angle">The angle to rotate around the given axis, in radians.</param>
6868 /// <returns>The rotation matrix.</returns>
6969 public static Matrix3X3 < T > CreateFromAxisAngle < T > ( Vector3D < T > axis , T angle )
70- where T : INumberBase < T >
70+ where T : ITrigonometricFunctions < T >
7171 {
7272 // a: angle
7373 // x, y, z: unit vector for axis.
@@ -120,7 +120,7 @@ public static Matrix3X3<T> CreateFromAxisAngle<T>(Vector3D<T> axis, T angle)
120120 /// <param name="quaternion">The source Quaternion.</param>
121121 /// <returns>The rotation matrix.</returns>
122122 public static Matrix3X3 < T > CreateFromQuaternion < T > ( Quaternion < T > quaternion )
123- where T : ITrigonometricFunctions < T >
123+ where T : INumber < T > , IRootFunctions < T > , ITrigonometricFunctions < T >
124124 {
125125 Matrix3X3 < T > result = Matrix3X3 < T > . Identity ;
126126
@@ -157,7 +157,7 @@ public static Matrix3X3<T> CreateFromQuaternion<T>(Quaternion<T> quaternion)
157157 /// <param name="roll">Angle of rotation, in radians, around the Z-axis.</param>
158158 /// <returns>The rotation matrix.</returns>
159159 public static Matrix3X3 < T > CreateFromYawPitchRoll < T > ( T yaw , T pitch , T roll )
160- where T : ITrigonometricFunctions < T >
160+ where T : INumber < T > , IRootFunctions < T > , ITrigonometricFunctions < T >
161161 {
162162 var q = Quaternion < T > . CreateFromYawPitchRoll ( yaw , pitch , roll ) ;
163163 return CreateFromQuaternion ( q ) ;
@@ -167,7 +167,7 @@ public static Matrix3X3<T> CreateFromYawPitchRoll<T>(T yaw, T pitch, T roll)
167167 /// <param name="radians">The amount, in radians, by which to rotate around the X-axis.</param>
168168 /// <returns>The rotation matrix.</returns>
169169 public static Matrix3X3 < T > CreateRotationX < T > ( T radians )
170- where T : INumberBase < T >
170+ where T : ITrigonometricFunctions < T >
171171 {
172172 Matrix3X3 < T > result = Matrix3X3 < T > . Identity ;
173173
@@ -191,7 +191,7 @@ public static Matrix3X3<T> CreateRotationX<T>(T radians)
191191 /// <param name="radians">The amount, in radians, by which to rotate around the Y-axis.</param>
192192 /// <returns>The rotation matrix.</returns>
193193 public static Matrix3X3 < T > CreateRotationY < T > ( T radians )
194- where T : INumberBase < T >
194+ where T : ITrigonometricFunctions < T >
195195 {
196196 Matrix3X3 < T > result = Matrix3X3 < T > . Identity ;
197197
@@ -214,7 +214,7 @@ public static Matrix3X3<T> CreateRotationY<T>(T radians)
214214 /// <param name="radians">The amount, in radians, by which to rotate around the Z-axis.</param>
215215 /// <returns>The rotation matrix.</returns>
216216 public static Matrix3X3 < T > CreateRotationZ < T > ( T radians )
217- where T : INumberBase < T >
217+ where T : ITrigonometricFunctions < T >
218218 {
219219 Matrix3X3 < T > result = Matrix3X3 < T > . Identity ;
220220
@@ -476,7 +476,7 @@ public static bool Decompose<T>(Matrix3X3<T> matrix, out Vector3D<T> scale, out
476476 /// <param name="rotation">The rotation to apply.</param>
477477 /// <returns>The transformed matrix.</returns>
478478 public static Matrix3X3 < T > Transform < T > ( Matrix3X3 < T > value , Quaternion < T > rotation )
479- where T : ITrigonometricFunctions < T >
479+ where T : INumber < T > , IRootFunctions < T > , ITrigonometricFunctions < T >
480480 {
481481 // Compute rotation matrix.
482482 T x2 = rotation . X + rotation . X ;
0 commit comments