GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/pinocchio/utils/axis-label.hpp Lines: 3 3 100.0 %
Date: 2024-01-23 21:41:47 Branches: 0 0 - %

Line Branch Exec Source
1
//
2
// Copyright (c) 2018 CNRS
3
//
4
5
#ifndef __pinocchio_axis_label_hpp__
6
#define __pinocchio_axis_label_hpp__
7
8
namespace pinocchio
9
{
10
11
  ///
12
  /// \brief Generate the label (X, Y or Z) of the axis relative to its index.
13
  ///
14
  /// \tparam axis Index of the axis (either 0 for X, 1 for Y and Z for 2).
15
  ///
16
  /// \returns a char containing the label of the axis.
17
  ///
18
  template<int axis> inline char axisLabel();
19
20
54515
  template<> inline char axisLabel<0>() { return 'X'; }
21
54516
  template<> inline char axisLabel<1>() { return 'Y'; }
22
54511
  template<> inline char axisLabel<2>() { return 'Z'; }
23
}
24
25
#endif // __pinocchio_axis_label_hpp__