Skip to content
Snippets Groups Projects
Commit f5a0fed1 authored by Antti Soininen's avatar Antti Soininen
Browse files

Make a local variable const. Re #24041

parent debd6e4d
No related branches found
No related tags found
No related merge requests found
...@@ -205,7 +205,7 @@ double V3D::zenith(const V3D &v) const { ...@@ -205,7 +205,7 @@ double V3D::zenith(const V3D &v) const {
* @return The angle between the vectors in radians (0 < theta < pi) * @return The angle between the vectors in radians (0 < theta < pi)
*/ */
double V3D::angle(const V3D &v) const { double V3D::angle(const V3D &v) const {
double ratio = this->scalar_prod(v) / (this->norm() * v.norm()); const double ratio = this->scalar_prod(v) / (this->norm() * v.norm());
if (ratio >= 1.0) // NOTE: Due to rounding errors, if v is if (ratio >= 1.0) // NOTE: Due to rounding errors, if v is
return 0.0; // is nearly the same as "this" or return 0.0; // is nearly the same as "this" or
......
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