# toineheuvelmans/Metron

Geometry, simplified.

Repository: https://github.com/toineheuvelmans/Metron
Canonical: https://ross.abutalabs.com/products/metron
Language: Swift
License: MIT
License Family: permissive
Topics: swift, geometry, trigonometry, coregraphics
Last push: 2019-07-05T06:53:28+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3365, "days_push": 2616, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1031, forks 34 (observed 2026-08-28T04:03:18.034020+00:00)

## What it is
Metron is a Swift library that extends CoreGraphics 2D geometric primitives with a comprehensive collection of geometric functions and types. It enables intuitive geometric calculations like circle containment tests, angle arithmetic, line segment intersections, and polygon operations.

## Use cases
- check if a touch point is inside a circle in iOS
- add and normalize angles in radians and degrees
- find intersections between line segments and view frames
- rotate polygon points around an anchor point and build a CGPath
- compute convex hull of a set of points
- calculate distances and relative positions of points in a rect

## When to choose
- you do 2D geometry or drawing math in Swift with CoreGraphics
- you want readable, expressive geometric calculations instead of manual trigonometry
- you need convenient extensions for CGPoint, CGVector, CGRect, and polygons

## When to avoid
- you need 3D geometry or physics simulation
- your project is not in Swift or does not use CoreGraphics
- you need a library with recent releases or active maintenance

## Facets
- artifact type: library
- maturity: maintenance
- function: math, graphics
- domain: graphics, developer-tools, cross-platform
- platform: -
- tags: coregraphics, geometry, trigonometry, 2d-graphics, cocoapods, swift-package-manager, swift, ios, macos

## Member repositories
- toineheuvelmans/Metron (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:18.034020+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:07:30.138802+00:00, confidence not recorded.
  - readme: https://github.com/toineheuvelmans/Metron (fetched 2026-08-28T04:03:18.034020+00:00, sha 91001574d226)
- Data as of 2026-08-30T08:39:29.467469+00:00.
