MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / DegToGrad

Function DegToGrad

extern/ttmath/ttmath.h:1751–1776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1749 */
1750 template<class ValueType>
1751 ValueType DegToGrad(const ValueType & x, ErrorCode * err = 0)
1752 {
1753 ValueType result, temp;
1754 uint c = 0;
1755
1756 if( x.IsNan() )
1757 {
1758 if( err )
1759 *err = err_improper_argument;
1760
1761 return x;
1762 }
1763
1764 result = x;
1765
1766 temp = 200;
1767 c += result.Mul(temp);
1768
1769 temp = 180;
1770 c += result.Div(temp);
1771
1772 if( err )
1773 *err = c ? err_overflow : err_ok;
1774
1775 return result;
1776 }
1777
1778
1779 /*!

Callers

nothing calls this directly

Calls 3

DegToDegFunction · 0.85
MulMethod · 0.45
DivMethod · 0.45

Tested by

no test coverage detected