?? squirmcell.cpp
字號(hào):
// SquirmCell.cpp
#include "stdafx.h"
#include "SquirmCell.h"
#include "SquirmCellSlot.h"
#include <math.h>
SquirmCell::SquirmCell(C2dVector loc,char type,int state)
: SquirmCellProperties(type,state)
{
this->location = loc;
AssignRandomVelocity();
}
void SquirmCell::AssignRandomVelocity()
{
// initialize with a random velocity
float angle = rand()*2.0F*3.1415926535F/RAND_MAX;
this->velocity.x = MAX_VELOCITY * (float)cos(angle);
this->velocity.y = MAX_VELOCITY * (float)sin(angle);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -