Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:programmingblocks:math [2018/06/07 13:33] kniwwelino [Constrain value] |
en:programmingblocks:math [2018/07/18 08:36] (current) kniwwelino [Trigonometric functions] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Math ===== | ||
+ | |||
+ | ==== Number ==== | ||
+ | {{: | ||
+ | |||
+ | This block allows you to define a positive or negative number and use it as part of another block. This number can either be an integer, e.g. '' | ||
+ | |||
+ | \\ | ||
+ | ==== Operation ==== | ||
+ | {{: | ||
+ | |||
+ | With this block you can make basic mathematical operations on two numbers. | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | ==== Random integer ==== | ||
+ | {{: | ||
+ | |||
+ | This block returns an integer between or equal to the two specified numbers, which is generated randomly at each call. | ||
+ | |||
+ | \\ | ||
+ | ==== Random fraction ==== | ||
+ | {{: | ||
+ | |||
+ | This block returns a random floating point number larger or equal to 0.0 and strictly smaller than 1.0. | ||
+ | |||
+ | \\ | ||
+ | ==== Increase variable ==== | ||
+ | {{: | ||
+ | |||
+ | This block, adds a number to a selected variable. When choosing a negative number, the number is substracted. | ||
+ | |||
+ | \\ | ||
+ | ==== Constrain value ==== | ||
+ | {{: | ||
+ | |||
+ | This block restricts a value to a specified range. The result will be identical if the value is between the two limits. In case the value is smaller than the minimum (resp larger then the maximum), the result will be set to the minimum (resp maximum). | ||
+ | \\ | ||
+ | ==== Map value ==== | ||
+ | {{: | ||
+ | |||
+ | \\ | ||
+ | ==== Mathematical functions ==== | ||
+ | {{: | ||
+ | |||
+ | This block allows you to apply classical mathematical functions to numbers. | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | ==== Trigonometric functions ==== | ||
+ | {{: | ||
+ | |||
+ | This block allows you to apply classical trigonometric functions to numbers. | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | ==== Mathematical constants ==== | ||
+ | {{: | ||
+ | |||
+ | This block provides you with mathematical constants. | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | \\ | ||
+ | ==== Number checks ==== | ||
+ | {{: | ||
+ | |||
+ | With this block you can do typical number checks. The result will be '' | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | ==== Rounding a number ==== | ||
+ | {{: | ||
+ | |||
+ | This block allows you to round a floating point number to an integer. | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | ==== Remainder ==== | ||
+ | {{: | ||
+ | |||
+ | This block returns the remainder after division of one number by another. | ||
+ | |||
+ | E.g. '' | ||
+ | |||