Remove fsgn() which is now unnecessary.

This commit is contained in:
King_DuckZ 2017-02-10 19:26:46 +00:00
parent ff91bbbc71
commit c30fe3012c
4 changed files with 0 additions and 73 deletions

View file

@ -22,7 +22,6 @@ add_library(${PROJECT_NAME}
worldsizenotifiable.cpp
worlditems.cpp
moveable.cpp
fsgn.cpp
grid_raytrace.cpp
)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)

View file

@ -1,47 +0,0 @@
/*
Copyright 2016, 2017 Michele "King_DuckZ" Santullo
This file is part of MyCurry.
MyCurry is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MyCurry is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MyCurry. If not, see <http://www.gnu.org/licenses/>.
*/
#include "fsgn.hpp"
#include <cstdint>
namespace curry {
//float fsgn (float parIn) {
// if (parIn < 0.0f) return -1.0f;
// if (parIn > 0.0f) return 1.0f;
// return 0.0f;
//}
float fsgn (float parIn) {
static_assert(sizeof(uint32_t) == sizeof(float), "Unexpected float size");
union {
uint32_t i;
float f;
} in, r;
in.f = parIn;
if ((in.i & 0x7FFFFFFF) == 0) {
return 0.0f;
}
else {
r.f = 1.0f;
r.i |= in.i & 0x80000000;
return r.f;
}
}
} //namespace curry

View file

@ -1,24 +0,0 @@
/*
Copyright 2016, 2017 Michele "King_DuckZ" Santullo
This file is part of MyCurry.
MyCurry is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MyCurry is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MyCurry. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
namespace curry {
float fsgn (float parIn);
} //namespace curry

View file

@ -20,7 +20,6 @@
#include "grid_raytrace.hpp"
#include "worldgrid.hpp"
#include "vectorwrapper/vectorops.hpp"
#include "fsgn.hpp"
#include "tileproperty.hpp"
#include <cassert>
#include <ciso646>