Miscellaneous
The Miscellaneous section in FTC block programming serves as a toolbox for various functions that don't neatly fit into other categories. The blocks range from comment, format numbers, to how to handle null value.
Comment
Comments serve as explanatory notes within your code. They have no impact on the Robot, no on the telemetry.
roundDecimal
Returns a number value of the given number rounded to the given precision. In the example, the block returns 3.14.
Key points:
Returns a numeric value.
formatNumber
Rounds a number to a certain precision and returns the rounded number as text. In the example, the block returns text “3.14”.
Key points:
Returns a text, instead of a numeric value.
Padded with 0 if necessary. For example, when 3.14 is rounded to precision of 3, “3.140” is returned.
null
null. It represents the absence of a value or object.
isNull
Returns true if the given value is null. Returns false if the given value is not null.
isNotNull
Returns true if the given value is not null. Returns false if the given value is null.