ENH: use vector::normalise and VectorSpace::normalised for clarity

This commit is contained in:
Mark Olesen
2018-08-10 15:18:29 +02:00
parent c1964d7807
commit 4d6f0498d6
75 changed files with 302 additions and 354 deletions

View File

@ -94,8 +94,7 @@ void Foam::circleSet::calcSamples
label nPoint = 1;
while (theta < 360)
{
axis1 = axis1*cosAlpha + (axis1^circleAxis_)*sinAlpha;
axis1 /= mag(axis1);
axis1 = normalised(axis1*cosAlpha + (axis1^circleAxis_)*sinAlpha);
point pt = origin_ + radius*axis1;
label celli = searchEngine().findCell(pt);

View File

@ -172,9 +172,7 @@ Foam::scalar Foam::sampledSet::calcSign
vec /= magVec;
vector n = mesh().faceAreas()[facei];
n /= mag(n) + VSMALL;
const vector n = normalised(mesh().faceAreas()[facei]);
return n & vec;
}