crypto
crypto copied to clipboard
The "mod" math remainder operator shall always return an integer
Even if both numbers are float or double the result is an integer in Roku.
Can you provide some test cases for this? I tried the following:
?type(3 mod 2&)
?type(7.5 mod 3)
?type(9& mod 2)
and get:
LongInteger
Float
LongInteger
The issue is not the type returned but the actual value:
'In Roku
? 7.5 mod 3
1
'In BRS
? 7.5 mod 3
1.5