GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • java.evolved

This view

  • Original page
  • New address

GeezerVison is showing javaevolved.dev — Math — java.evolved

Home / Topics / Math
🏷 Math 1 patterns

Topic: Math

All Java patterns related to Math — java.evolved

Date/Time

Math.clamp()

Old // Clamp value between min and max int clamped = Math.min(Math.max(value, 0), 100); // or: min and max order confusion
Modern int clamped = Math.clamp(value, 0, 100); // value constrained to [0, 100]
hover to see modern →
JDK 21+ learn more →
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.