STIR 6.4.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__
24
25START_NAMESPACE_STIR
31
33
47inline int round(const float x);
49
52inline int round(const double x);
53
55
58template <int num_dimensions, class elemT>
59inline BasicCoordinate<num_dimensions, int> round(const BasicCoordinate<num_dimensions, elemT>& x);
60
62
72template <typename integerT>
73inline void round_to(integerT& result, const float x);
74
76
78template <int num_dimensions, class integerT, class elemT>
79inline void round_to(BasicCoordinate<num_dimensions, integerT>& result, const BasicCoordinate<num_dimensions, elemT>& x);
80
82
83END_NAMESPACE_STIR
84
85#include "stir/round.inl"
86
87#endif
This file declares class stir::BasicCoordinate and some functions acting on stir::BasicCoordinate obj...
int round(const float x)
Implements rounding of floating point numbers.
Definition round.inl:59
void round_to(integerT &result, const float x)
Implements rounding of floating point numbers to other integer types.
Definition round.inl:26
Implementation of the stir::round functions.