# Crate figures[−][src]

## Expand description

A small math library specialized for 2d screen graphics.

## Feature Flags

To enable serialization of most types, enable the `serde`

feature flag.

## Re-exports

`pub use approx;` | |

`pub use num_traits;` |

## Structs

DisplayScale | Scaling ratios for |

ExtentsRect | A rectangle that uses two |

Figure | A value in a specific unit. |

Pixels | A unit representing physical pixels. |

Point | A location represented by an x and y value. |

Points | A unit representing DPI-adjusted resolution configured on the system. |

Scale | Allows converting between |

Scaled | A unit representing virtual pixels that are scaled on top of the DPI
adjustment done for the |

Size | A measurement of space using width and height. |

SizedRect | A rectangle that uses a |

Vector | A 2d measurement using x and y values. |

## Enums

Angle | An angle of rotation. |

Rect | A 2d rectangle. This type may internally be represented with a |

## Traits

Approx | Allows comparing floating point numbers with approximation. |

Ceil | Defines the smallest integer equal or greater than the original value. |

Displayable | Methods for converting between display scales. |

Floor | Defines the biggest integer equal or lower than the original value. |

One | Returns a one value. |

Rectlike | Functionalitiy that all rectangle types implement |

Round | Defines the nearest integer value to the original value. |

Vectorlike | Methods that enable converting between 2d types that have two components. |

Zero | Returns a zero value. |