Merge branch 'master' of https://github.com/ZDoom/gzdoom
This commit is contained in:
commit
a6fc168f0b
3 changed files with 43 additions and 0 deletions
|
|
@ -1019,6 +1019,45 @@ struct TVector4
|
|||
}
|
||||
};
|
||||
|
||||
inline void ZeroSubnormalsF(double& num)
|
||||
{
|
||||
if (fabs(num) < FLT_MIN) num = 0;
|
||||
}
|
||||
|
||||
inline void ZeroSubnormals(double& num)
|
||||
{
|
||||
if (fabs(num) < DBL_MIN) num = 0;
|
||||
}
|
||||
|
||||
inline void ZeroSubnormals(float& num)
|
||||
{
|
||||
if (fabsf(num) < FLT_MIN) num = 0;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline void ZeroSubnormals(TVector2<T>& vec)
|
||||
{
|
||||
ZeroSubnormals(vec.X);
|
||||
ZeroSubnormals(vec.Y);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline void ZeroSubnormals(TVector3<T>& vec)
|
||||
{
|
||||
ZeroSubnormals(vec.X);
|
||||
ZeroSubnormals(vec.Y);
|
||||
ZeroSubnormals(vec.Z);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline void ZeroSubnormals(TVector4<T>& vec)
|
||||
{
|
||||
ZeroSubnormals(vec.X);
|
||||
ZeroSubnormals(vec.Y);
|
||||
ZeroSubnormals(vec.Z);
|
||||
ZeroSubnormals(vec.W);
|
||||
}
|
||||
|
||||
template<class vec_t>
|
||||
struct TMatrix3x3
|
||||
{
|
||||
|
|
|
|||
|
|
@ -924,6 +924,7 @@ class CommandDrawString : public SBarInfoCommand
|
|||
break;
|
||||
default:
|
||||
str = GStrings.localize(label.GetChars());
|
||||
RealignString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -774,6 +774,9 @@ public:
|
|||
|
||||
void Set(DVector3 &off, int f = -1)
|
||||
{
|
||||
ZeroSubnormalsF(off.X);
|
||||
ZeroSubnormalsF(off.Y);
|
||||
ZeroSubnormalsF(off.Z);
|
||||
Offset = off;
|
||||
|
||||
if (f > -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue