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

Function RadToGrad

extern/ttmath/ttmath.h:1719–1742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1717 */
1718 template<class ValueType>
1719 ValueType RadToGrad(const ValueType & x, ErrorCode * err = 0)
1720 {
1721 ValueType result, delimiter;
1722 uint c = 0;
1723
1724 if( x.IsNan() )
1725 {
1726 if( err )
1727 *err = err_improper_argument;
1728
1729 return x;
1730 }
1731
1732 result = 200;
1733 c += result.Mul(x);
1734
1735 delimiter.SetPi();
1736 c += result.Div(delimiter);
1737
1738 if( err )
1739 *err = c ? err_overflow : err_ok;
1740
1741 return result;
1742 }
1743
1744
1745 /*!

Callers

nothing calls this directly

Calls 2

MulMethod · 0.45
DivMethod · 0.45

Tested by

no test coverage detected