SIN・COS・TAN

 SIN・COS・TANのサンプルです。
while not Keys.newPress.Start do
	Controls.read()
	startDrawing()
	screen.print(SCREEN_UP, 0, 0, "Press START to quit")
 
	screen.print(SCREEN_DOWN, 0, 0* 8, "sin math.pi / 4 = sin 45")
	screen.print(SCREEN_DOWN, 0, 1 * 8, math.sin(math.pi / 4))
 
	screen.print(SCREEN_DOWN, 0, 3 * 8, "cos = math.pi / 3 = cos 60")
	screen.print(SCREEN_DOWN, 0, 4 * 8, math.cos(math.pi / 3))
 
	screen.print(SCREEN_DOWN, 0, 6 * 8, "tan = math.pi / 6 = tan 30")
	screen.print(SCREEN_DOWN, 0, 7 * 8, math.tan(math.pi / 6))
 
        stopDrawing()
end
 





タグ:

+ タグ編集
  • タグ:
最終更新:2010年07月11日 23:29
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。