-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMathAdditions.h
31 lines (24 loc) · 1.75 KB
/
MathAdditions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// ====================================================================================================
//
// SuPReMo: Surrogate Parameterised Respiratory Motion Model
// An implementation of the generalised motion modelling and image registration framework
//
// Copyright (c) University College London (UCL). All rights reserved.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE.
//
// See LICENSE.txt in the top level directory for details.
//
// ====================================================================================================
#pragma once
#include <math.h>
// Functions dedicated to replace reg_math macros
template<typename T>
inline int nmm_floorInt( const T& val )
{
// This is how it should be
return static_cast<int>(floor( val ));
}
// #define nmm_floorInt( a ) ((a) > 0 ? (int)(a) : (int)((a)-1))