Hi, I have been using the toDouble() function to convert a string to double. However, the toDouble() method is only available from 3.1 and I'd like to add some devices that don't support 3.x.
I found a solution here on the forum and it works in the simulator, by using toFloat().toDouble()
I was just curious to understand if I will get any issues with this conversion (or get a different value as a result).
Here is a code example to show what I want to do:
var timeString = "1611495355000" // sample time represented as String //previous solution, works for 3.0 devices: var sampleTime = new Time.Moment(timeString.toDouble() / 1000); //new solution, works also for 2.0 devices: var sampleTime = new Time.Moment(timeString.toFloat().toDouble() / 1000);
thanks in advance
/Fredrik