java - Math.min(Math.max(x, 0), 8) what does it mean? -


I was looking at the Sudoku Android application's sudoku code and I saw this code:

selX = Math.min (Math.max (x, 0), 8); Sely = Math. Middle (Math. Max (y, 0), 8);

what Math.min (Math.max (x, 0), 8) and Math.min (Math.max (y, 0) What does it do), 8) mean

step by step using Docs Break:

Maximum (int a, int b) gives excess of two integer values.

minutes (int a, int b) gives two infinite values.

then Math.Man (Math.x (x, 0), 8);

int max = mathematics.max (x, 0);

int final = Math.Man (max, 8);


Comments