mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
- fixed float <-> fixed conversion errors in Fragglescript.
This commit is contained in:
parent
06dc96b062
commit
39d03f12b1
2 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ struct svalue_t
|
||||||
|
|
||||||
void setDouble(double dp)
|
void setDouble(double dp)
|
||||||
{
|
{
|
||||||
value.f = fsfix(dp/65536);
|
value.f = fsfix(dp * 65536);
|
||||||
type = svt_fixed;
|
type = svt_fixed;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -93,7 +93,7 @@ double floatvalue(const svalue_t &v)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
v.type == svt_string ? atof(v.string) :
|
v.type == svt_string ? atof(v.string) :
|
||||||
v.type == svt_fixed ? v.value.f * 65536. :
|
v.type == svt_fixed ? v.value.f / 65536. :
|
||||||
v.type == svt_mobj ? -1. : (double)v.value.i;
|
v.type == svt_mobj ? -1. : (double)v.value.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue