java - Why is it a good idea to use Math.min() for x, y coordinates and math.abs() -


why idea use math.min() x-y coordinates , width , height using math.abs() method (for rectangle)? thought x-y coordinates positive, i'm confused why matters.

the x,y coordinates represent position of rectangle on plane; can negative since rectangle can place anywhere relative origin (ie. 0,0 position).

the height , width of rectangle must positive negative lenghts not defined.

considering then, makes sense use math.min position , math.abs dimension.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -