//	M120 : Op֐̃`[g}\
option double;

define	fEnd = _FALSE;

//------------------------------------------------------------------------------//
//	Op֐̃`[g}\													//
//																				//
//	߂l	F	Ȃ															//
//------------------------------------------------------------------------------//
function main()
{
	define	t;
	define	dat[8];

	_Cls();
	_Print("Op֐̃`[g}\܂B\n");
	_Print("̒l-5.0`+5.0ŃJbg܂B\n");
	_Print("`[gEChN[YƁA}N̎sI܂\n");

	_TmcOpen("Op֐`[g}", "P: B=10000");
	_TmcWndMove(200,100);
	_TmcWndSize(500,300);
	_TmcClear();
	_TmcSetItems(3);
	_TmcSetRange(-5.1, +5.1);

	t = 0;
	while (!fEnd) {
		dat[0] = _Sin(t);
		dat[1] = _Cos(t);
		dat[2] = _Tan(t);
		if (_Abs(dat[2]) >= 5) {
			dat[2] = _Max(dat[2], -5);
			dat[2] = _Min(dat[2], +5);
		}
		_TmcPutData(dat[]);
		t++;
		_msWait(10);
	}
	_TmcClose();

}
//------------------------------------------------------------------------------//
//	^C`[gEChEN[Y̏									//
//																				//
//			F	x - wʒu				 										//
//				y - xʒu														//
//																				//
//	߂l	F	Ȃ															//
//------------------------------------------------------------------------------//
function _OnTmcClose()
{
	fEnd = _TRUE;
}
