示例#1
0
文件: PV3D.cpp 项目: SalamiCo/IGrP6
PV3D* PV3D::normaliza(){
	// Same direction but module = 1
	PV3D* newV = new PV3D();
	GLdouble moduleVector = module(this);

	newV->setX((1 / moduleVector) * this->getX());
	newV->setY((1 / moduleVector) * this->getY());
	newV->setZ((1 / moduleVector) * this->getZ());
	newV->setPV(0); //vector

	return newV;
}