Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.util
Class MathUtil

    java.lang.Object
      com.vividsolutions.jts.util.MathUtil

    public class MathUtil

extends java.lang.Object

Various utility functions for mathematical and numerical operations.

Author:
  mbdavis

Constructor Summary
`MathUtil()`

Method Summary
`static double` | `clamp(double x, double min, double max)` Clamps a value to a given range.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MathUtil

    public MathUtil()

Method Detail

### clamp

    public static double clamp(double x,
                               double min,
                               double max)

  Clamps a value to a given range.

  Parameters:
    `x` - the value to clamp
    `min` - the minimum value of the range
    `max` - the maximum value of the range
  Returns:
    the clamped value

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD