MCPcopy Create free account
hub / github.com/arq5x/bedtools2 / MakeAbsDouble

Function MakeAbsDouble

src/utils/VectorOps/VectorOps.cpp:29–37  ·  view source on GitHub ↗

functor to convert the abs() of single string to a double

Source from the content-addressed store, hash-verified

27
28// functor to convert the abs() of single string to a double
29double MakeAbsDouble(const string &element) {
30 std::istringstream i(element);
31 double x;
32 if (!(i >> x)) {
33 cerr << "Error: Could not properly convert string to numeric (\"" + element + "\")" << endl;
34 exit(1);
35 }
36 return fabs(x);
37}
38
39struct ValueGreaterThan
40{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected