clang-tidy fixes, documentation, refactoring.

This commit is contained in:
2023-10-21 02:07:59 -07:00
parent 4e83da345f
commit aee337f2e9
26 changed files with 325 additions and 238 deletions

View File

@@ -1,3 +1,26 @@
///
/// \file src/scmp/geom/Orientation.cc
/// \author K. Isom <kyle@imap.cc>
/// \date 2017-06-05
/// \brief Orientation of vectors w.r.t. a reference plane, assumed to
/// be the Earth.
///
/// Copyright 2017 K. Isom <kyle@imap.cc>
///
/// Permission to use, copy, modify, and/or distribute this software for
/// any purpose with or without fee is hereby granted, provided that
/// the above copyright notice and this permission notice appear in all /// copies.
///
/// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
/// WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
/// WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
/// AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
/// DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
/// OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
/// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
/// PERFORMANCE OF THIS SOFTWARE.
///
#include <scmp/geom/Vector.h>
#include <scmp/geom/Orientation.h>
@@ -14,25 +37,25 @@ Heading2F(Vector2F vec)
float
Heading3f(Vector3F vec)
Heading3F(Vector3F vec)
{
Vector2F vec2f {vec[0], vec[1]};
const Vector2F vec2f {vec.At(BasisX), vec.At(BasisY)};
return Heading2F(vec2f);
}
double
Heading2d(Vector2D vec)
Heading2D(Vector2D vec)
{
return vec.Angle(Basis2D[BasisX]);
}
double
Heading3d(Vector3D vec)
Heading3D(Vector3D vec)
{
Vector2D vec2d {vec[0], vec[1]};
return Heading2d(vec2d);
const Vector2D vec2d {vec.At(BasisX), vec.At(BasisY)};
return Heading2D(vec2d);
}