Reference×
Reference
- [] (array access)
- = (assign)
- catch
- class
- , (comma)
- // (comment)
- {} (curly braces)
- /** */ (doc comment)
- . (dot)
- draw()
- exit()
- extends
- false
- final
- implements
- import
- loop()
- /* */ (multiline comment)
- new
- noLoop()
- null
- () (parentheses)
- popStyle()
- pop()
- public
- private
- pushStyle()
- push()
- return
- redraw()
- ; (semicolon)
- setResizable()
- setLocation()
- setTitle()
- setup()
- static
- super
- this
- true
- thread()
- void
- try
Name
min()
Description
Determines the smallest value in a sequence of numbers, and then returns that value. min() accepts either two or three float or int values as parameters, or an array of any length.
Examples
int d = min(5, 9); // Sets 'd' to 5 int e = min(-4, -12); // Sets 'e' to -12 float f = min(12.3, 230.24); // Sets 'f' to 12.3
int[] values = { 5, 1, 2, -3 }; // Create an array of ints int h = min(values); // Sets 'h' to -3
Syntax
min(a, b)
min(a, b, c)
min(list)
Parameters
a
(float, int)
first numberb
(float, int)
second numberc
(float, int)
third numberlist
(int[], float[])
array of numbers to compare
Return
float or int
Related

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.