Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
map::utils Namespace Reference

Functions

float getMin (std::array< galaxis::lina::Vector2f, 4 > const &array, int index)
 
float getMax (std::array< galaxis::lina::Vector2f, 4 > const &array, int index)
 

Function Documentation

◆ getMax()

float map::utils::getMax ( std::array< galaxis::lina::Vector2f, 4 > const &  array,
int  index 
)
inline

Definition at line 20 of file MapUtils.hpp.

20  {
21  float max = array[0][index];
22  for(auto const& item: array) {
23  if(item[index] > max) {
24  max = item[index];
25  }
26  }
27  return max;
28  }

Referenced by MapDataLayer::getLineObject().

Here is the caller graph for this function:

◆ getMin()

float map::utils::getMin ( std::array< galaxis::lina::Vector2f, 4 > const &  array,
int  index 
)
inline

Definition at line 10 of file MapUtils.hpp.

10  {
11  float min = array[0][index];
12  for(auto const& item: array) {
13  if(item[index] < min) {
14  min = item[index];
15  }
16  }
17  return min;
18  }

Referenced by MapDataLayer::getLineObject().

Here is the caller graph for this function: