mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix floating point precision problems.
This commit is contained in:
parent
10075c0d9e
commit
fe462826b6
@ -35,7 +35,7 @@ if(_sendToExtension) then {
|
||||
|
||||
_cmd = format["set_animation_state:%1,", (_vehicle getVariable[QGVAR(id), -1])];
|
||||
{
|
||||
_cmd = _cmd + format["%1,%2,", (_x select 0), ([(_x select 1)] call CBA_fnc_formatNumber)];
|
||||
_cmd = _cmd + format["%1,%2,", (_x select 0), (_x select 1)];
|
||||
} forEach _animationResults;
|
||||
|
||||
_cmd call FUNC(callExtension);
|
||||
|
@ -14,7 +14,7 @@ namespace ace {
|
||||
const std::string & as_string() const { return _args[_index]; }
|
||||
operator const std::string &() const { return as_string(); }
|
||||
|
||||
float as_float() const { return atof(_args[_index].c_str()); }
|
||||
float as_float() const { float res = 0.0f; std::istringstream iss(_args[_index]); iss >> res; return res; }
|
||||
operator float() const { return as_float(); }
|
||||
|
||||
int as_int() const { return atoi(_args[_index].c_str()); }
|
||||
|
@ -111,7 +111,7 @@ namespace ace {
|
||||
lod(const ace::p3d::lod_p, const ace::p3d::model_p);
|
||||
~lod();
|
||||
uint32_t id;
|
||||
float type;
|
||||
uint32_t type;
|
||||
vertex_table vertices;
|
||||
ace::vector3<float> autocenter_pos;
|
||||
std::map<std::string, named_selection_p> selections;
|
||||
|
Loading…
Reference in New Issue
Block a user