/*広告*/

/*STGの作り方 Sin値表示プログラム*/

/*目次へ戻る*/

#include "DxLib.h" #include <math.h> int key[256]; int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int){ ChangeWindowMode(TRUE); DxLib_Init(); SetDrawScreen(DX_SCREEN_BACK); float x = 0; int angle = 0; int gamecount = 0; int Color_White = GetColor(255,255,255); while (ScreenFlip()==0 && ProcessMessage()==0 && ClearDrawScreen()==0){ if(gamecount % 30 == 0){ angle++; float angle2 = angle * (DX_PI / 180); x = sin(angle2); } gamecount++; DrawFormatString(0,0,Color_White, "Sin%d度・・・%f",angle,x); } DxLib_End(); return 0; }

/*ページの先頭へ*/

/*目次へ戻る*/

/*HOME*/

/*Copyright 2016 K.N/petitetech.com*/

/*広告*/