• Post Reply Bookmark Topic Watch Topic
  • New Topic

larger values and shorter values  RSS feed

 
Jesus Rod Valenzuela
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know how to find the larger value by using Math.max but how do I multiply the other two values example:
double larger = Math.max(double, Math.max(double, double));  , so how do I make this equation larger*larger==shorter1^2+shorter2^2
 
Piet Souris
Master Rancher
Posts: 2044
75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Easiest is by making an array of the three doubles, sorting it and then interrogating the equation. Three short lines of code.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!