Skip to content

Commit

Permalink
WaveSabreCore: remove x == 0.0 special-case
Browse files Browse the repository at this point in the history
This these already returns 1.0 when x = 0.0, so no need to special case
it.
  • Loading branch information
kusma authored and yupferris committed Sep 13, 2020
1 parent 24a276e commit c896fe5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions WaveSabreCore/src/Helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ namespace WaveSabreCore
double Helpers::Exp2(double x)
{
#if defined(_MSC_VER) && defined(_M_IX86)
if (x == 0.0)
return 1.0;

return fpuExp2(x);
#else
return pow(2.0, x);
Expand All @@ -128,9 +125,6 @@ namespace WaveSabreCore
float Helpers::Exp2F(float x)
{
#if defined(_MSC_VER) && defined(_M_IX86)
if (x == 0.0f)
return 1.0f;

return fpuExp2F(x);
#else
return powf(2.0f, x);
Expand Down

0 comments on commit c896fe5

Please sign in to comment.