Conform to coding standard.

This commit is contained in:
Babiuch, Ryan Nicholas 2016-02-04 08:26:56 -06:00
parent 142ec76600
commit dca7ff967c
2 changed files with 9 additions and 9 deletions

View file

@ -1866,7 +1866,7 @@ glm::mat4 MyAvatar::FollowHelper::postPhysicsUpdate(const MyAvatar& myAvatar, co
float MyAvatar::getAccelerationEnergy() {
glm::vec3 velocity = getVelocity();
int changeInVelocity = abs(velocity.length() - priorVelocity.length());
float changeInEnergy = priorVelocity.length()*changeInVelocity*AVATAR_MOVEMENT_ENERGY_CONSTANT;
float changeInEnergy = priorVelocity.length() * changeInVelocity * AVATAR_MOVEMENT_ENERGY_CONSTANT;
priorVelocity = velocity;
return changeInEnergy;
@ -1881,7 +1881,7 @@ void MyAvatar::setEnergy(float value) {
}
float MyAvatar::getAudioEnergy() {
return getAudioLoudness()*AUDIO_ENERGY_CONSTANT;
return getAudioLoudness() * AUDIO_ENERGY_CONSTANT;
}
bool MyAvatar::didTeleport() {

View file

@ -123,10 +123,10 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties
propertiesWithSimID.setDimensionsInitialized(properties.dimensionsChanged());
auto dimensions = propertiesWithSimID.getDimensions();
float volume = dimensions.x*dimensions.y*dimensions.z;
float volume = dimensions.x * dimensions.y * dimensions.z;
auto density = propertiesWithSimID.getDensity();
auto newVelocity = propertiesWithSimID.getVelocity().length();
double cost = calculateCost(density*volume, 0, newVelocity);
double cost = calculateCost(density * volume, 0, newVelocity);
cost *= costMultiplier;
if(cost > _currentAvatarEnergy) {
@ -231,10 +231,10 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties&
EntityItemProperties properties = scriptSideProperties;
auto dimensions = properties.getDimensions();
float volume = dimensions.x*dimensions.y*dimensions.z;
float volume = dimensions.x * dimensions.y * dimensions.z;
auto density = properties.getDensity();
auto newVelocity = properties.getVelocity().length();
double cost = calculateCost(density*volume, 0, newVelocity);
double cost = calculateCost(density * volume, 0, newVelocity);
cost *= costMultiplier;
if(cost > _currentAvatarEnergy) {
@ -351,10 +351,10 @@ void EntityScriptingInterface::deleteEntity(QUuid id) {
if (entity) {
auto dimensions = entity->getDimensions();
float volume = dimensions.x*dimensions.y*dimensions.z;
float volume = dimensions.x * dimensions.y * dimensions.z;
auto density = entity->getDensity();
auto velocity = entity->getVelocity().length();
double cost = calculateCost(density*volume, velocity, 0);
double cost = calculateCost(density * volume, velocity, 0);
cost *= costMultiplier;
if(cost > _currentAvatarEnergy) {
@ -1041,7 +1041,7 @@ QStringList EntityScriptingInterface::getJointNames(const QUuid& entityID) {
return result;
}
float EntityScriptingInterface::calculateCost(float mass, float oldVelocity,float newVelocity) {
float EntityScriptingInterface::calculateCost(float mass, float oldVelocity, float newVelocity) {
return std::abs(mass * (newVelocity - oldVelocity));
}