## go-units

go-units

## Synopsis

    #define             PT_PER_IN
    #define             CM_PER_IN
    #define             EMU_PER_IN
    #define             UN_PER_IN
    #define             UN_PER_EMU
    #define             UN_PER_PT
    #define             UN_PER_CM
    #define             GO_IN_TO_UN                         (inch)
    #define             GO_IN_TO_PT                         (inch)
    #define             GO_IN_TO_CM                         (inch)
    #define             GO_IN_TO_EMU                        (inch)
    #define             GO_UN_TO_IN                         (unit)
    #define             GO_UN_TO_PT                         (unit)
    #define             GO_UN_TO_CM                         (unit)
    #define             GO_UN_TO_EMU                        (unit)
    #define             GO_PT_TO_UN                         (pt)
    #define             GO_PT_TO_IN                         (pt)
    #define             GO_PT_TO_CM                         (pt)
    #define             GO_PT_TO_EMU                        (pt)
    #define             GO_CM_TO_UN                         (cm)
    #define             GO_CM_TO_IN                         (cm)
    #define             GO_CM_TO_PT                         (cm)
    #define             GO_CM_TO_EMU                        (cm)
    #define             GO_EMU_TO_UN                        (emu)
    #define             GO_EMU_TO_IN                        (emu)
    #define             GO_EMU_TO_PT                        (emu)
    #define             GO_EMU_TO_CM                        (emu)
    typedef             GODistance;
                        GOPoint;
                        GORect;

## Description

## Details

### PT_PER_IN

    #define PT_PER_IN 72

### CM_PER_IN

    #define CM_PER_IN 254

### EMU_PER_IN

    #define EMU_PER_IN 914400

### UN_PER_IN

    #define UN_PER_IN 228600000

### UN_PER_EMU

    #define UN_PER_EMU (UN_PER_IN/EMU_PER_IN)

### UN_PER_PT

    #define UN_PER_PT (UN_PER_IN/PT_PER_IN)

### UN_PER_CM

    #define UN_PER_CM (UN_PER_IN/CM_PER_IN)

### GO_IN_TO_UN()

    #define GO_IN_TO_UN(inch)	((inch)*UN_PER_IN)

`inch` : |

### GO_IN_TO_PT()

    #define GO_IN_TO_PT(inch)	((inch)*PT_PER_IN)

`inch` : |

### GO_IN_TO_CM()

    #define GO_IN_TO_CM(inch)	((inch)*CM_PER_IN/100)

`inch` : |

### GO_IN_TO_EMU()

    #define GO_IN_TO_EMU(inch)	((inch)*EMU_PER_IN)

`inch` : |

### GO_UN_TO_IN()

    #define GO_UN_TO_IN(unit)	((unit)/UN_PER_IN)

`unit` : |

### GO_UN_TO_PT()

    #define GO_UN_TO_PT(unit)	((unit)/UN_PER_PT)

`unit` : |

### GO_UN_TO_CM()

    #define GO_UN_TO_CM(unit)	((unit)/UN_PER_CM/100)

`unit` : |

### GO_UN_TO_EMU()

    #define GO_UN_TO_EMU(unit)	((unit)/UN_PER_EMU)

`unit` : |

### GO_PT_TO_UN()

    #define GO_PT_TO_UN(pt)		((pt)* UN_PER_PT)

`pt` : |

### GO_PT_TO_IN()

    #define GO_PT_TO_IN(pt)		((pt)           /PT_PER_IN)

`pt` : |

### GO_PT_TO_CM()

    #define GO_PT_TO_CM(pt)		((pt)* CM_PER_IN/PT_PER_IN/100)

`pt` : |

### GO_PT_TO_EMU()

    #define GO_PT_TO_EMU(pt)	((pt)*EMU_PER_IN/PT_PER_IN)

`pt` : |

### GO_CM_TO_UN()

    #define GO_CM_TO_UN(cm)		((cm)*100*UN_PER_CM)

`cm` : |

### GO_CM_TO_IN()

    #define GO_CM_TO_IN(cm)		((cm)*100          /CM_PER_IN)

`cm` : |

### GO_CM_TO_PT()

    #define GO_CM_TO_PT(cm)		((cm)*100*PT_PER_IN/CM_PER_IN)

`cm` : |

### GO_CM_TO_EMU()

    #define GO_CM_TO_EMU(cm)	((cm)*100*PT_PER_IN/EMU_PER_IN)

`cm` : |

### GO_EMU_TO_UN()

    #define GO_EMU_TO_UN(emu)	((emu)*UN_PER_EMU)

`emu` : |

### GO_EMU_TO_IN()

    #define GO_EMU_TO_IN(emu)	((emu)          /EMU_PER_IN)

`emu` : |

### GO_EMU_TO_PT()

    #define GO_EMU_TO_PT(emu)	((emu)*PT_PER_IN/EMU_PER_IN)

`emu` : |

### GO_EMU_TO_CM()

    #define GO_EMU_TO_CM(emu)	((emu)*CM_PER_IN/EMU_PER_IN/100)

`emu` : |

### GODistance

    typedef gint64 GODistance;

### GOPoint

    typedef struct {
    	GODistance x;
    	GODistance y;
    } GOPoint;

### GORect

    typedef struct {
    	GODistance top;
    	GODistance left;
    	GODistance bottom;
    	GODistance right;
    } GORect;