FRAMES NO FRAMES

IlcDegToRad

public IlcFloat IlcDegToRad(IlcFloat angle)
Definition file: ilsolver/nlinflt.h

This function converts an angle expressed in degrees to an angle expressed in radians.

If you want to manipulate constrained floating-point expressions in degrees, we strongly recommend that you call the trigonometric functions on variables expressed in radians and then convert the results to degrees (rather than declaring the constrained floating-point expressions in degrees and then converting them to radians to call the trigonometric functions).

The reason for that advice is that the method we recommend gives more accurate results in the context of the usual floating-point pitfalls. See the IBM ILOG Solver User's Manual for an explanation of those pitfalls.

Good practice:

 IloSolver s;
 IlcFloatVar x(s,0,IlcPi);
 IlcFloatExp y=IlcSin(x);
 // ... constraints on x and y ...