# [−][src]Module quicksilver::geom

A 2D geometry module

It contains basic shapes such as rectangles and circles, as well as vectors, lines, and a universal Shape API. It also has matrix-backed Transforms for arbitrary constant-time 2D transformations, such as rotating, scaling, or translating.

The Tilemap allows 2D storage of data in a world-like grid, and also moving objects at given speeds around the map, which is highly useful for games like platformers.

## Structs

Circle | A circle with a center and a radius |

Line | A line with a starting and end point |

Rectangle | A rectangle with a top-left position and a size |

Tile | An individual tile |

Tilemap | A grid of Tile values |

Transform | A 2D transformation represented by a matrix |

Triangle | A triangle with three points |

Vector | A 2D vector with an arbitrary numeric type |

## Traits

Scalar | A Scalar type that can be converted to a component of a Vector |

Shape | The collision and positional attributes of shapes |

## Functions

about_equal | Find if two floating points are about equal |

lerp | Linearly interpolate between two values |

lerp_angle | Linearly interpolate between two angles, trying to find the shortest path |