-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[blockly] Support Quantity in more math blocks (#2041)
Closes #2001. Adds Quantity support for more math blocks: - math_single had to be reimplemented - math_minmax was added Note that there is a special case on min/max if the inputs are not of equal type an error will be shown to user. In the special case of variables Blockly does its best to detect the right code to be generated for the min/max block: - both are variables -> then numerical input is expected - one of inputs is a variable: then blockly uses the type of the other non-var-block to base the generation on (either number or quantity comparison) - note that no type conversion of the inputs is done Also-by: Florian Hotze <florianh_dev@icloud.com> Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
- Loading branch information
1 parent
aaa5e7a
commit e2ebc1d
Showing
2 changed files
with
189 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters