mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:42:55 +02:00
changed all fmin to std::min
This commit is contained in:
parent
26adabf130
commit
550ec8a9c7
2 changed files with 11 additions and 8 deletions
|
@ -7,6 +7,7 @@
|
|||
//
|
||||
//
|
||||
|
||||
#include <algorithm>
|
||||
#include <AbstractAudioInterface.h>
|
||||
#include <VoxelTree.h>
|
||||
#include <AvatarData.h>
|
||||
|
@ -294,9 +295,9 @@ void ParticleCollisionSystem::updateCollisionSound(Particle* particle, const glm
|
|||
// Noise is a function of the angle of collision
|
||||
// Duration of the sound is a function of both base frequency and velocity of impact
|
||||
_audio->startCollisionSound(
|
||||
fmin(COLLISION_LOUDNESS * velocityTowardCollision, 1.f),
|
||||
std::min(COLLISION_LOUDNESS * velocityTowardCollision, 1.f),
|
||||
frequency * (1.f + velocityTangentToCollision / velocityTowardCollision),
|
||||
fmin(velocityTangentToCollision / velocityTowardCollision * NOISE_SCALING, 1.f),
|
||||
std::min(velocityTangentToCollision / velocityTowardCollision * NOISE_SCALING, 1.f),
|
||||
1.f - DURATION_SCALING * powf(frequency, 0.5f) / velocityTowardCollision, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <glm/gtc/noise.hpp>
|
||||
|
||||
//#include <QtCore/QDebug>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QImage>
|
||||
#include <QRgb>
|
||||
|
||||
|
@ -83,13 +85,13 @@ float findNewLeafSize(const glm::vec3& nudgeAmount, float leafSize) {
|
|||
|
||||
float newLeafSize = leafSize;
|
||||
if (newLeafSizeX) {
|
||||
newLeafSize = fmin(newLeafSize, newLeafSizeX);
|
||||
newLeafSize = std::min(newLeafSize, newLeafSizeX);
|
||||
}
|
||||
if (newLeafSizeY) {
|
||||
newLeafSize = fmin(newLeafSize, newLeafSizeY);
|
||||
newLeafSize = std::min(newLeafSize, newLeafSizeY);
|
||||
}
|
||||
if (newLeafSizeZ) {
|
||||
newLeafSize = fmin(newLeafSize, newLeafSizeZ);
|
||||
newLeafSize = std::min(newLeafSize, newLeafSizeZ);
|
||||
}
|
||||
return newLeafSize;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue