Skip to content
Snippets Groups Projects
Commit 92f2f6ac authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MeL] FaceRule: Simplify return value calculation.

parent 094eae8f
No related branches found
No related tags found
No related merge requests found
...@@ -15,11 +15,10 @@ ...@@ -15,11 +15,10 @@
namespace MeshLib namespace MeshLib
{ {
bool FaceRule::testElementNodeOrder(const Element* e) bool FaceRule::testElementNodeOrder(const Element* e)
{ {
MathLib::Vector3 up_vec (0,0,1); return getSurfaceNormal(e)[2] < 0;
return (MathLib::scalarProduct(getSurfaceNormal(e), up_vec) < 0) ? true : false; }
MathLib::Vector3 FaceRule::getFirstSurfaceVector(Element const* const e) MathLib::Vector3 FaceRule::getFirstSurfaceVector(Element const* const e)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment