MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / Compare

Method Compare

src/cryptlib/integer.cpp:2043–2059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2041}
2042
2043int Integer::Compare(const Integer& t) const
2044{
2045 if (NotNegative())
2046 {
2047 if (t.NotNegative())
2048 return PositiveCompare(t);
2049 else
2050 return 1;
2051 }
2052 else
2053 {
2054 if (t.NotNegative())
2055 return -1;
2056 else
2057 return -PositiveCompare(t);
2058 }
2059}
2060
2061Integer Integer::SquareRoot() const
2062{

Callers 6

operator==Method · 0.45
operator!=Method · 0.45
operator>Method · 0.45
operator>=Method · 0.45
operator<Method · 0.45
operator<=Method · 0.45

Calls 1

NotNegativeMethod · 0.80

Tested by

no test coverage detected