34 releases (breaking)

0.31.1 Mar 5, 2025
0.30.0 Dec 16, 2024
0.29.1 Oct 1, 2024
0.28.1 Jul 5, 2024
0.10.0 Feb 28, 2021

#1183 in GUI

Download history 61098/week @ 2024-12-05 63965/week @ 2024-12-12 44501/week @ 2024-12-19 29042/week @ 2024-12-26 51473/week @ 2025-01-02 58535/week @ 2025-01-09 59654/week @ 2025-01-16 56040/week @ 2025-01-23 64322/week @ 2025-01-30 103184/week @ 2025-02-06 142540/week @ 2025-02-13 185035/week @ 2025-02-20 199660/week @ 2025-02-27 199955/week @ 2025-03-06 206296/week @ 2025-03-13 148366/week @ 2025-03-20

787,744 downloads per month
Used in 999 crates (19 directly)

MIT/Apache

130KB
3K SLoC

emath - egui math library

Latest version Documentation unsafe forbidden MIT Apache

A bare-bones 2D math library with types and functions useful for GUI building.

Made for egui.


lib.rs:

Opinionated 2D math library for building GUIs.

Includes vectors, positions, rectangles etc.

Conventions (unless otherwise specified):

  • All angles are in radians
  • X+ is right and Y+ is down.
  • (0,0) is left top.
  • Dimension order is always x y

Integrating with other math libraries.

emath does not strive to become a general purpose or all-powerful math library.

For that, use something else (glam, nalgebra, …) and enable the mint feature flag in emath to enable implicit conversion to/from emath.

Feature flags

Dependencies

~225KB