CustusX
18.04
An IGT application
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
cxMathUtils.cpp
Go to the documentation of this file.
1
/*=========================================================================
2
This file is part of CustusX, an Image Guided Therapy Application.
3
4
Copyright (c) SINTEF Department of Medical Technology.
5
All rights reserved.
6
7
CustusX is released under a BSD 3-Clause license.
8
9
See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10
=========================================================================*/
11
12
#include "
cxMathUtils.h
"
13
namespace
cx
{
14
double
roundAwayFromZero
(
double
val)
15
{
16
if
(val >= 0)
17
return
int(val+0.5);
18
else
19
return
int(val-0.5);
20
}
21
22
unsigned
int
roundUnsigned
(
double
val)
23
{
24
return
int(val+0.5);
25
}
26
27
28
}
cx::roundAwayFromZero
double roundAwayFromZero(double val)
Definition:
cxMathUtils.cpp:14
cxMathUtils.h
cx::roundUnsigned
unsigned int roundUnsigned(double val)
Definition:
cxMathUtils.cpp:22
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
CX
source
resource
core
Math
cxMathUtils.cpp
Generated on Tue Apr 24 2018 13:56:44 for CustusX by
1.8.11