EasyManua.ls Logo

Texas Instruments TI-92+ - Page 36

Texas Instruments TI-92+
507 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...
Define draw_all()=Prgm
PxlHorz main\±oy
PxlVert main\±ox
PxlHorz main\±ty
PxlVert main\±tx
PxlCrcl main\±oy,main\±ox,2
EndPrgm
© help()
© Display help dialog box
Define help()=Prgm
Dialog
Title "Ruler Help"
Text "[O] Set origin"
Text "[M] Measure"
Text "[STO] Copy measurement to Home"
Text "[H] Help"
Text "To quit:"
Text "[HOME], [ESC] or [QUIT]"
EndDlog
EndPrgm
© move_x(mode,distance)
© Move cursor (target or origin) in x-direction
Define move_x(m,i)=Prgm
If m=1 then © Move target cursor
PxlVert main\±tx,0 © ... erase old cursor line
mod(main\±tx+i,main\±x)main\±tx © ... find new coordinate with wrap-around
Else © Move origin cursor
PxlVert main\±ox,0 © ... erase old cursor line
PxlCrcl main\±oy,main\±ox,2,0 © ... erase old origin circle
mod(main\±ox+i,main\±x)main\±ox © ... find new coordinate with wrap-around
Endif
EndPrgm
© move_y(mode, distance)
© Move cursor (target or origin) in y-direction
Define move_y(m,i)=Prgm
If m=1 then © Move target cursor
PxlHorz main\±ty,0 © ... erase old cursor line
mod(main\±ty+i,main\±y)main\±ty © ... find new coordinate with wrap-around
Else © Move origin cursor
PxlHorz main\±oy,0 © ... erase old cursor line
PxlCrcl main\±oy,main\±ox,2,0 © ... erase old origin circle
mod(main\±oy+i,main\±y)main\±oy © ... find new coordinate with wrap-around
Endif
EndPrgm
© dist()
© Find distance and angle for current cursor locations
Define dist()=Func
local dd,dr,xd,yd
© dd angle in degrees
© dr angle in radians
© xd x-axis distance between cursors
© yd y-axis distance between cursors
(main\±tx-main\±ox)*±sclxd © Find x-axis distance
(main\±oy-main\±ty)*±sclyd © Find y-axis distance
If xd=0 and yd=0 Then © Find angle
undefdr:drdd © ... angle is undef if x=0 and y=0
else
RPθ(xd,yd)dr © ... else calculate angle in radians
dr*180/Œdd © ... and degrees
1 - 25

Table of Contents

Related product manuals