add osApproxEquals for float, vector and rotation, note that default margin is 1e-6 to match strings rounding

This commit is contained in:
UbitUmarov
2018-11-20 18:12:18 +00:00
parent c4a0e574c8
commit cb1ebd1604
7 changed files with 220 additions and 33 deletions

View File

@@ -540,5 +540,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer start, LSL_Integer count, LSL_Integer ignorecase);
LSL_String osStringRemove(LSL_String src, LSL_Integer start, LSL_Integer count);
LSL_String osStringReplace(LSL_String src, LSL_String oldvalue, LSL_String newvalue);
LSL_Integer osApproxEquals(LSL_Float a, LSL_Float b);
LSL_Integer osApproxEquals(LSL_Float a, LSL_Float b, LSL_Float margin);
LSL_Integer osApproxEquals(vector va, vector vb);
LSL_Integer osApproxEquals(vector va, vector vb, LSL_Float margin);
LSL_Integer osApproxEquals(rotation ra, rotation rb);
LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin);
}
}