My code like this:
a := 800 b := 600 f := a / b.toFloat java: f == 1.33 js: f == 1
Maybe divFloat has some problem.
divFloat
java:
public static double divFloat(long self, double x) { return (double)self / x; }
js:
fan.sys.Int.divFloat = function(a, b) { return fan.sys.Float.make(fan.sys.Int.div(a, b)); }
Thanks @go4 - pushed a fix
Int.divDecimal too
Int.divDecimal
Decimal isn't implemented in JavaScript yet - so probably have to touch all that code when its gets added - so not too worried about it here.
Login or Signup to reply.
go4 Sun 10 Jul 2011
My code like this:
Maybe
divFloat
has some problem.java:
js:
andy Mon 11 Jul 2011
Thanks @go4 - pushed a fix
go4 Tue 12 Jul 2011
Int.divDecimal
tooandy Tue 12 Jul 2011
Decimal isn't implemented in JavaScript yet - so probably have to touch all that code when its gets added - so not too worried about it here.