mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Fix llList2CSV with -nan in vector and quaternion (with test case).
This commit is contained in:
parent
2044f888d4
commit
2d72b8e198
2 changed files with 2 additions and 1 deletions
|
@ -986,7 +986,7 @@ def llList2CSV(lst):
|
|||
else:
|
||||
ret.append(u'%.6f' % elem)
|
||||
elif type(elem) in (Vector, Quaternion):
|
||||
ret.append(u'<' + u', '.join(list(u'%.6f' % x for x in elem)) + u'>')
|
||||
ret.append(u'<' + llList2CSV(list(elem)) + u'>')
|
||||
else:
|
||||
ret.append(InternalTypecast(elem, unicode, InList=True, f32=True))
|
||||
ret = u', '.join(ret)
|
||||
|
|
|
@ -835,6 +835,7 @@ def do_tests():
|
|||
test('llList2CSV([llSqrt(F32(-1))])', u'-nan')
|
||||
test('llList2CSV([llPow(-1.0,F32(1.3))])', u'-nan')
|
||||
test('llList2CSV([llPow(nan,F32(1.3))])', u'nan')
|
||||
test('llList2CSV([Vector((-nan,nan,-inf))])', u'<-nan, nan, -inf>')
|
||||
|
||||
testXB64S("", "", "")
|
||||
testXB64S(u"Hello, World!", u"", u"Hello, World!")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue