1240
Appendix B: Global Variables — Graphing
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
gr_active, gr_other
(continued)
Inputs:
None
Outputs:
None
Assumptions:
Access_AMS_Global_Variables is defined.
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also:
None
Example:
/* Given a floating point independent value and a pointer to its graph Window
variables min, max, and step values, ICvtFtoP returns the corresponding increment
or 0xFFFF if the independent value is out of range.
*/
WORD ICvtFtoP( BCD16 f, BCD16 *indep_rng )
{ Access_AMS_Global_Variables;
WORD NewInc;
switch (gr_active->graph_mode) {
case GR_FUNC:
return( (WORD) XCvtFtoP(f, gr_active) );
case GR_DE:
case GR_SEQ:
case GR_PAR:
case GR_POL:
if (gr_CptIndepInc(f, indep_rng, &NewInc))
return( NewInc );
case GR_3D:
return ((f - gr_active->rngp[GR_XMIN]) * (gr_active->rngp[GR_XGRID] /
(gr_active->rngp[GR_XMAX] - gr_active->rngp[GR_XMIN])));
}
return 0xFFFF;
}