GIMP Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# gimpmath

## Name

gimpmath --

## Synopsis

    #define     G_PI
    #define     G_PI_2
    #define     G_PI_4
    #define     G_SQRT2
    #define     G_MAXRAND
    #define     RINT                            (x)
    #define     ROUND                           (x)
    #define     SQR                             (x)
    #define     MAX255                          (a)
    #define     CLAMP0255                       (a)

## Description

## Details

### G_PI

    #define G_PI    3.14159265358979323846

### G_PI_2

    #define G_PI_2  1.57079632679489661923

### G_PI_4

    #define G_PI_4  0.78539816339744830962

### G_SQRT2

    #define G_SQRT2 1.4142135623730951

### G_MAXRAND

    #define     G_MAXRAND

### RINT()

    #define     RINT(x)

`x` : |

### ROUND()

    #define ROUND(x) ((int) ((x) + 0.5))

`x` : |

### SQR()

    #define SQR(x) ((x) * (x))

`x` : |

### MAX255()

    #define MAX255(a)  ((a) | (((a) & 256) - (((a) & 256) >> 8)))

`a` : |

### CLAMP0255()

    #define CLAMP0255(a)  CLAMP(a,0,255)

`a` : |

<<< Previous Page | Home | Up | Next Page >>>
gimplimits | GIMP Library