petsc-3.14.5 2021-03-03
Report Typos and Errors

# PetscClipInterval

Returns a number clipped to be within an interval

### Synopsis

    #include <petscmath.h>
    type clip PetscClipInterval(type x,type a,type b)

Not Collective

### Input Parameter

| x | - value to use if within interval [a,b]
| a | - lower end of interval
| b | - upper end of interval

### Notes

type can be integer or floating point value

### See Also

PetscMin(), PetscMax(), PetscAbsInt(), PetscAbsReal(), PetscSqr()

### Level

beginner

### Location

include/petscmath.h

### Examples

src/snes/tutorials/ex15.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages