EasyManua.ls Logo

Texas Instruments TI-89 - Cptdeltax

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
588
Appendix A: System Routines — Graphing
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
CptDeltax
Declaration:
BYTE
CptDeltax
(GR_WIN_VARS *
ptr
)
Category(ies):
Graphing
Description:
Computes Window variable
x using the viewing window values and
window width in the GR_WIN_VARS struct pointed to by
ptr
and sets the
GR_DIRTY flag (
ptr
->gr_win_flags & GR_DIRTY
) if the newly computed
x is not equal to the old
x.
CptDeltax
verifies that there will be a unique
x coordinate for each pixel column.
Inputs:
ptr
Pointer to the GR_WIN_VARS struct to use for viewing window
values and window width (
gr_active
for the active graph window,
gr_other
for the second graph in two graph mode).
Outputs:
Returns 0 if
x could not be computed due to invalid viewing window
values or if the new
x is so small that it will not insure unique values for
each pixel column, otherwise returns 1. If valid, the new
x is stored in
(
ptr
->rngp)[GR_DELTAX]
.
Assumptions:
Assumes the window width in
ptr
->xmaxpix
is correct. If the window size
has been changed since the graph was last displayed,
ptr
->xmaxpix
will
not have been updated, so the new
x will not be correct. In this case,
x
will automatically be recomputed the next time the graph is displayed,
using the correct window width.
Side Effects:
If the GR_DIRTY flag is set, the graph will be redrawn next time it is
displayed.
Availability:
All versions of the TI-89 / TI-92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: CkValidDelta, CptDeltay
Example:
/* make sure deltax and deltay are correct */
if(gr_active->gr_win_flags & GR_DIRTY)
/* viewing window values may have changed, recompute deltax and deltay */
if ( ! ( CptDeltax(gr_active) && CptDeltay(gr_active) ) )
ER_throw( ER_RANGE ); /* cannot compute valid deltax and deltay */

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals