## liboilmacros

liboilmacros —

##

# Synopsis

    #define     oil_min                         (x,y)
    #define     oil_max                         (x,y)
    #define     oil_divide_255                  (x)
    #define     oil_rand_rgba                   (a)
    #define     oil_argb                        (a,r,g,b)
    #define     oil_argb_noclamp                (a,r,g,b)
    #define     oil_argb_A                      (color)
    #define     oil_argb_G                      (color)
    #define     oil_argb_B                      (color)
    #define     oil_argb_R                      (color)
    #define     oil_muldiv_255                  (a,b)
    #define     oil_clamp_255                   (x)

## Description

## Details

### oil_min()

    #define oil_min(x,y) ((x)<(y)?(x):(y))

`x` : |
`y` : |

### oil_max()

    #define oil_max(x,y) ((x)>(y)?(x):(y))

`x` : |
`y` : |

### oil_divide_255()

    #define oil_divide_255(x) ((((x)+128) + (((x)+128)>>8))>>8)

`x` : |

### oil_rand_rgba()

    #define     oil_rand_rgba(a)

`a` : |

### oil_argb()

    #define     oil_argb(a,r,g,b)

`a` : |
`r` : |
`g` : |
`b` : |

### oil_argb_noclamp()

    #define     oil_argb_noclamp(a,r,g,b)

`a` : |
`r` : |
`g` : |
`b` : |

### oil_argb_A()

    #define oil_argb_A(color) (((color)>>24)&0xff)

`color` : |

### oil_argb_G()

    #define oil_argb_G(color) (((color)>>8)&0xff)

`color` : |

### oil_argb_B()

    #define oil_argb_B(color) (((color)>>0)&0xff)

`color` : |

### oil_argb_R()

    #define oil_argb_R(color) (((color)>>16)&0xff)

`color` : |

### oil_muldiv_255()

    #define oil_muldiv_255(a,b) oil_divide_255((a)*(b))

`a` : |
`b` : |

### oil_clamp_255()

    #define oil_clamp_255(x) oil_max(0,oil_min((x),255))

`x` : |