Improve the float/int cast logic
Merge branch 'fix-numeric-casting' into develop

* fix-numeric-casting:
  Improve the float/int cast logic