Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121691519
Utility.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 13, 05:06
Size
285 B
Mime Type
text/x-c
Expires
Tue, Jul 15, 05:06 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27375105
Attached To
R8820 scATAC-seq
Utility.cpp
View Options
#include <Utility.hpp>
#include <cmath>
double
round
(
double
x
,
int
n
)
{
// should it be floored or ceiled
int
d
=
0
;
if
((
x
*
pow
(
10
,
n
+
1
))
-
(
floor
(
x
*
pow
(
10
,
n
)))
>
4
)
{
d
=
1
;
}
// rounding
x
=
(
floor
(
x
*
pow
(
10
,
n
))
+
d
)
/
pow
(
10
,
n
)
;
return
x
;
}
Event Timeline
Log In to Comment