Skip to content

Commit 03e3287

Browse files
committed
std:sqrt
1 parent 722611d commit 03e3287

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Recorder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const stk::StkFloat din = 0.0030; // end correction
4141
const stk::StkFloat dout = 0.0063; // end correction
4242
const stk::StkFloat dm = din + dout; // end correction of mouth
4343
const stk::StkFloat dd = 0.0035; // acoustic distance between Q1 and Q2
44-
const stk::StkFloat rp = sqrt(Sp / stk::STK_PI);
44+
const stk::StkFloat rp = std::sqrt(Sp / stk::STK_PI);
4545
const stk::StkFloat b = 0.4f * h; // jet width
4646

4747
// Calculation coefficients
@@ -272,7 +272,7 @@ StkFloat Recorder::tick( unsigned int )
272272
Qj_ = h * H * Uj_;
273273

274274
// Jet drive
275-
StkFloat Uj_steady = std::fmax(sqrt(2 * pf / rho), 0.1f);
275+
StkFloat Uj_steady = std::max(std::sqrt(2.0f * pf / rho), 0.1f);
276276
StkFloat fc_jet = 0.36f / W * Uj_steady;
277277
StkFloat g_jet = 0.002004f * std::exp(-0.06046f * Uj_steady);
278278
StkFloat r_jet = 0.95f - Uj_steady * 0.015f;

src/TwoPole.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void TwoPole :: setResonance( StkFloat frequency, StkFloat radius, bool normaliz
6060
// Normalize the filter gain ... not terribly efficient.
6161
StkFloat real = 1 - radius + (a_[2] - radius) * std::cos(STK_TWO_PI * 2 * frequency / Stk::sampleRate());
6262
StkFloat imag = (a_[2] - radius) * std::sin(STK_TWO_PI * 2 * frequency / Stk::sampleRate());
63-
b_[0] = sqrt( std::pow(real, 2) + std::pow(imag, 2) );
63+
b_[0] = std::sqrt( std::pow(real, 2) + std::pow(imag, 2) );
6464
}
6565
}
6666

src/Vector3D.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ inline StkFloat Vector3D :: getLength( void )
5959
temp = X_ * X_;
6060
temp += Y_ * Y_;
6161
temp += Z_ * Z_;
62-
temp = sqrt( temp );
62+
temp = std::sqrt( temp );
6363
return temp;
6464
}
6565

0 commit comments

Comments
 (0)