Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Cast number to int or float explicitly #12

Open
Tracked by #13
HenryQuan opened this issue May 15, 2022 · 1 comment
Open
Tracked by #13

Cast number to int or float explicitly #12

HenryQuan opened this issue May 15, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@HenryQuan
Copy link
Member

In Python, this is not a big problem. However, this is causing some minor issues in Dart because int isn't double and visa versa. Now, num type is used when the number can be both int and double. However, I am not sure if this is a good practise.

We should discuss on where we should do the casting, Python or Dart. We can simply call toDouble() to make int a double in Dart. Alternatively, we can do it from Python in generate.py.

Also, this might not be a real problem at all.

@HenryQuan
Copy link
Member Author

This has causing serveral crashes. We cannot possibly test all ships so we should always cast the number to int or double from the python side. This needs to be done soon.

@HenryQuan HenryQuan added the enhancement New feature or request label May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants