X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FVectorUtils.hxx;h=efb5937ba61b70078f7548e571e5b0bb661e0d4f;hb=b832b15337be013a56e0976170e5e235b89fcb03;hp=0ea31cb344b6bf78bc34278f288b7d0bfe3e0ab8;hpb=1b5fb5650409b0ad3a61da3215496f2adf2dae02;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/VectorUtils.hxx b/src/INTERP_KERNEL/VectorUtils.hxx index 0ea31cb34..efb5937ba 100644 --- a/src/INTERP_KERNEL/VectorUtils.hxx +++ b/src/INTERP_KERNEL/VectorUtils.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2023 CEA, EDF +// Copyright (C) 2007-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -159,6 +159,16 @@ namespace INTERP_KERNEL return epsilonEqual(dot(cros, cros), 0.0, eps); } + /** + * Caracteristic vector size (its biggest component, in absolute) + */ + inline double caracteristicDimVector(const double *v) + { + double ret = 0; + for (int i = 0; i < 3; i++) + ret = std::max(ret, std::fabs(v[i])); + return ret; + } /** * Compares doubles using a relative tolerance