|
@@ -402,7 +402,7 @@ s.getLocalRotation().fromAxes(axes);
|
|
|
|
|
|
=== Rotation Matrix
|
|
=== Rotation Matrix
|
|
|
|
|
|
-Commonly you might find yourself with a <<jme3/matrix#,Matrix>> defining a rotation. In fact, it's very common to contain a rotation in a <<jme3/matrix#,Matrix>> create a Quaternion, rotate the Quaternion, and then get the <<jme3/matrix#,Matrix>> back. Quaternion contains a `fromRotationMatrix` method that will create the appropriate Quaternion based on the give <<jme3/matrix#,Matrix>>. The `toRotationMatrix` will populate a given <<jme3/matrix#,Matrix>>.
|
|
|
|
|
|
+Commonly you might find yourself with a <<jme3/matrix#,Matrix>> defining a rotation. In fact, it's very common to contain a rotation in a Matrix create a Quaternion, rotate the Quaternion, and then get the Matrix back. Quaternion contains a `fromRotationMatrix` method that will create the appropriate Quaternion based on the give Matrix. The `toRotationMatrix` will populate a given Matrix.
|
|
|
|
|
|
|
|
|
|
==== Example - Rotate a Spatial Using a Rotation Matrix
|
|
==== Example - Rotate a Spatial Using a Rotation Matrix
|
|
@@ -513,7 +513,7 @@ There are five major categories of functions that FastMath provides.
|
|
* sign - provides the sign of a value (1 if positive, -1 if negative, 0 if 0).
|
|
* sign - provides the sign of a value (1 if positive, -1 if negative, 0 if 0).
|
|
* log - provides the link:http://en.wikipedia.org/wiki/Natural_logarithm[natural logarithm] of a value.
|
|
* log - provides the link:http://en.wikipedia.org/wiki/Natural_logarithm[natural logarithm] of a value.
|
|
* sqrt - provides the link:http://en.wikipedia.org/wiki/Square_root[square root] of a value.
|
|
* sqrt - provides the link:http://en.wikipedia.org/wiki/Square_root[square root] of a value.
|
|
-* invSqrt - provides the inverse link:http://en.wikipedia.org/wiki/Square_root[square root] of a value (1 / sqrt(value).
|
|
|
|
|
|
+* invSqrt - provides the inverse square root of a value (1 / sqrt(value).
|
|
|
|
|
|
|
|
|
|
==== Linear Algebra
|
|
==== Linear Algebra
|
|
@@ -527,7 +527,7 @@ There are five major categories of functions that FastMath provides.
|
|
* counterClockwise - given three points (defining a triangle), the winding is determined. 1 if counter-clockwise, -1 if clockwise and 0 if the points define a line.
|
|
* counterClockwise - given three points (defining a triangle), the winding is determined. 1 if counter-clockwise, -1 if clockwise and 0 if the points define a line.
|
|
* pointInsideTriangle - calculates if a point is inside a triangle.
|
|
* pointInsideTriangle - calculates if a point is inside a triangle.
|
|
* sphericalToCartesian - converts a point from link:https://en.wikipedia.org/wiki/Spherical_coordinate_system[spherical coordinates] to link:https://en.wikipedia.org/wiki/Cartesian[cartesian coordinates].
|
|
* sphericalToCartesian - converts a point from link:https://en.wikipedia.org/wiki/Spherical_coordinate_system[spherical coordinates] to link:https://en.wikipedia.org/wiki/Cartesian[cartesian coordinates].
|
|
-* cartesianToSpherical - converts a point from link:https://en.wikipedia.org/wiki/Cartesian[cartesian coordinates] to link:https://en.wikipedia.org/wiki/Spherical_coordinate_system[spherical coordinates].
|
|
|
|
|
|
+* cartesianToSpherical - converts a point from cartesian coordinates to link:https://en.wikipedia.org/wiki/Spherical_coordinate_system[spherical coordinates].
|
|
|
|
|
|
|
|
|
|
==== Misc.
|
|
==== Misc.
|