| CkValidDelta | Function (ROM Call 0x1C3)

graphing.h

unsigned char CkValidDelta (float maxrng, float minrng, float delta);

Checks the validity of a given delta.

CkValidDelta checks to see if the exponent of delta is too small relative to the exponents of maxrng and minrng so that all the significant digits of delta would be shifted out of the floating-point mantissa when performing arithmetic.
The parameter maxrng is the final value in the graph window variable sequence (e.g., xmax, ymax, tmax, etc.). The parameter minrng is the first value in the graph window variable sequence (e.g., xmin, ymin, tmin, etc.). The parameter delta is the increment value which will be used to compute the sequence from minrng to maxrng (e.g., Δx, Δy, tstep, etc.).
CkValidDelta returns 1 if delta is valid, 0 if the exponent of delta is too small.
Note: CkValidDelta assumes the sign of delta has already been verified as correct for computing a sequence from minrng to maxrng. It is valid for maxrng to be less than minrng if delta is negative.

Uses: _bcd_math
Used by: CptDeltax, StepCk, cmd_drawinv

See also: StepCk