Reference p5.NumberDict

p5.NumberDict

A simple Dictionary class for Numbers.

Methods

add

Add the given number to the value currently stored at the given key. The sum then replaces the value previously stored in the Dictionary.

sub

Subtract the given number from the value currently stored at the given key. The difference then replaces the value previously stored in the Dictionary.

mult

Multiply the given number with the value currently stored at the given key. The product then replaces the value previously stored in the Dictionary.

div

Divide the given number with the value currently stored at the given key. The quotient then replaces the value previously stored in the Dictionary.

minValue

Return the lowest number currently stored in the Dictionary.

maxValue

Return the highest number currently stored in the Dictionary.

minKey

Return the lowest key currently used in the Dictionary.

maxKey

Return the highest key currently used in the Dictionary.

Notice any errors or typos? Please let us know. Please feel free to edit src/data/p5.TypedDict.js and open a pull request!

Related References