?? datastruct.cpp
字號:
#include "datastruct.h"void ZWorld::setWorld(int X,int Y,int W,int H, float x1,float y1,float x2,float y2){ this->X=X;this->Y=Y; this->W=W;this->H=H; this->x1=x1;this->y1=y1; this->x2=x2;this->y2=y2; scaleX=(float)W/(x2-x1); scaleY=(float)H/(y1-y2);}float ZWorld::fx(int x){ return((float)(x-X)/scaleX+x1);}float ZWorld::fy(int y){ return((float)(y-Y)/scaleY+y1);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -