Subtract the given number from the value currently stored at the given key. The difference then replaces the value previously stored in the Dictionary.
Examples
Syntax
sub(Key, Number)
Parameters
Key
Number:
for the value you wish to subtract from
Number
Number:
to subtract from the value
This page is generated from the comments in src/data/p5.TypedDict.js . Please feel free to edit it and submit a pull request!
Related References
createNumberDict
Creates a new instance of p5.NumberDict using the key-value pair or object you provide.
createStringDict
Creates a new instance of p5.StringDict using the key-value pair or the object you provide.
p5.NumberDict
A simple Dictionary class for Numbers.
p5.StringDict
A simple Dictionary class for Strings.