STIR  6.2.0
round.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000- 2005, Hammersmith Imanet Ltd
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
11 #ifndef __stir_round_H__
12 #define __stir_round_H__
13 
23 #include "stir/BasicCoordinate.h"
24 
25 START_NAMESPACE_STIR
31 
33 
47 inline int round(const float x);
49 
52 inline int round(const double x);
53 
55 
58 template <int num_dimensions, class elemT>
59 inline BasicCoordinate<num_dimensions, int> round(const BasicCoordinate<num_dimensions, elemT>& x);
60 
62 
72 template <typename integerT>
73 inline void round_to(integerT& result, const float x);
74 
76 
78 template <int num_dimensions, class integerT, class elemT>
79 inline void round_to(BasicCoordinate<num_dimensions, integerT>& result, const BasicCoordinate<num_dimensions, elemT>& x);
80 
82 
83 END_NAMESPACE_STIR
84 
85 #include "stir/round.inl"
86 
87 #endif
BasicCoordinate< num_dimensions, int > round(const BasicCoordinate< num_dimensions, elemT > &x)
Implements rounding of a BasicCoordinate object.
Definition: round.inl:78
Implementation of the stir::round functions.
This file declares class stir::BasicCoordinate and some functions acting on stir::BasicCoordinate obj...
void round_to(BasicCoordinate< num_dimensions, integerT > &result, const BasicCoordinate< num_dimensions, elemT > &x)
Implements rounding of a BasicCoordinate object to other integer types.
Definition: round.inl:88