Hello qrli!
Version 5.3.6 includes a new
Cheers!
I cannot call a CLR function with single precesion float parameters, because Javascript numbers are double.
Version 5.3.6 includes a new
toSingle()
method for passing float
arguments. Here's an example using ClearScriptConsole:-> list = new System.Collections.Generic.List(System.Single)
[HostObject:List<Single>]
-> list.Add(Math.PI)
Error: The best overloaded method match for 'System.Collections.Generic.List<float>.Add(float)' has some invalid arguments
-> list.Add(host.toSingle(Math.PI))
-> list[0]
3.14159274101257
The new version also provides toByte()
, toInt16()
, etc.Cheers!