Updated format of rotation for consistency with coordinate systems
This commit is contained in:
parent
291ffd4eed
commit
e15c8da28c
2 changed files with 11 additions and 3 deletions
|
@ -32,11 +32,18 @@ License
|
|||
Foam::tensor Foam::RodriguesRotation
|
||||
(
|
||||
const vector& rotationAxis,
|
||||
const scalar& rotationAngle
|
||||
const scalar& rotationAngle,
|
||||
const bool inDegrees
|
||||
)
|
||||
{
|
||||
tensor rotTensor;
|
||||
scalar theta = rotationAngle*mathematicalConstant::pi/180.0;
|
||||
scalar theta = rotationAngle;
|
||||
|
||||
if (inDegrees)
|
||||
{
|
||||
theta *= mathematicalConstant::pi/180.0;
|
||||
}
|
||||
|
||||
scalar sinTheta = sin(theta);
|
||||
scalar cosTheta = cos(theta);
|
||||
scalar oneMinusCosTheta = 1.0 - cosTheta;
|
||||
|
|
|
@ -53,7 +53,8 @@ namespace Foam
|
|||
tensor RodriguesRotation
|
||||
(
|
||||
const vector& rotationAxis,
|
||||
const scalar& rotationAngle
|
||||
const scalar& rotationAngle,
|
||||
const bool inDegrees = true
|
||||
);
|
||||
|
||||
|
||||
|
|
Reference in a new issue