Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
angle_and_norms.hpp
Go to the documentation of this file.
1
#ifndef SRC_COMMON_LIB_INCLUDE_COMMON_LIB_MATHS_ANGLE_AND_NORMS_HPP_
2
#define SRC_COMMON_LIB_INCLUDE_COMMON_LIB_MATHS_ANGLE_AND_NORMS_HPP_
3
4
#include <cmath>
5
6
#include "
common_lib/structures/position.hpp
"
7
8
namespace
common_lib::maths
{
9
10
using
TwoDVector
=
common_lib::structures::Position
;
11
16
struct
AngleAndNorms
{
17
double
angle_
;
18
double
norm1_
;
19
double
norm2_
;
20
AngleAndNorms
() =
default
;
21
AngleAndNorms
(
double
angle,
double
norm1,
double
norm2)
22
:
angle_
(angle),
norm1_
(norm1),
norm2_
(norm2){};
23
AngleAndNorms
(
const
TwoDVector
& v1,
const
TwoDVector
& v2);
24
};
25
33
AngleAndNorms
angle_and_norms
(
const
TwoDVector
& vector1,
const
TwoDVector
& vector2);
34
}
// namespace common_lib::maths
35
36
#endif
// SRC_COMMON_LIB_INCLUDE_COMMON_LIB_MATHS_ANGLE_AND_NORM_HPP_
common_lib::maths
Definition
angle_and_norms.hpp:8
common_lib::maths::angle_and_norms
AngleAndNorms angle_and_norms(const TwoDVector &vector1, const TwoDVector &vector2)
Function used to calculate the angle between two vectors and their norms.
Definition
angle_and_norms.cpp:4
common_lib::maths::TwoDVector
common_lib::structures::Position TwoDVector
Definition
angle_and_norms.hpp:10
position.hpp
common_lib::maths::AngleAndNorms
structure to store the angle formed between two vectors and their norms
Definition
angle_and_norms.hpp:16
common_lib::maths::AngleAndNorms::AngleAndNorms
AngleAndNorms()=default
common_lib::maths::AngleAndNorms::norm2_
double norm2_
Definition
angle_and_norms.hpp:19
common_lib::maths::AngleAndNorms::angle_
double angle_
Definition
angle_and_norms.hpp:17
common_lib::maths::AngleAndNorms::norm1_
double norm1_
Definition
angle_and_norms.hpp:18
common_lib::maths::AngleAndNorms::AngleAndNorms
AngleAndNorms(double angle, double norm1, double norm2)
Definition
angle_and_norms.hpp:21
common_lib::structures::Position
Definition
position.hpp:7
src
common_lib
include
common_lib
maths
angle_and_norms.hpp
Generated by
1.9.8