MCPcopy Index your code
hub / github.com/Tarliton/collision2d

github.com/Tarliton/collision2d @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
106 symbols 500 edges 14 files 42 documented · 40%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Collision2D

Build Status GoDoc Coverage Status Go Report Card

About

Collision2D is a simple Go library for performing collision detection (and projection-based collision response) of simple 2D shapes. It uses the Separating Axis Theorem. It was based on the JavaScript library SAT-js by jriecken.

It supports detecting collisions between: - Circles (using Voronoi Regions.) - Convex Polygons (and simple Axis-Aligned Boxes, which are of course, convex polygons.)

It also supports checking whether a point is inside a circle or polygon.

It's released under the MIT license.

To import in your Go project you can use:

`import "github.com/Tarliton/collision2d"`

Core symbols most depended-on inside this repo

NewVector
called by 111
vector.go
NewPolygon
called by 21
polygon.go
Copy
called by 20
vector.go
NewCircle
called by 17
circle.go
Sub
called by 12
vector.go
Dot
called by 8
vector.go
Normalize
called by 7
vector.go
Len2
called by 7
vector.go

Shape

Function 69
Method 32
Struct 5

Languages

Go100%

Modules by API surface

vector_test.go21 symbols
vector.go20 symbols
collision_test.go16 symbols
polygon.go10 symbols
collision.go9 symbols
polygon_test.go8 symbols
response.go4 symbols
circle.go4 symbols
box_test.go4 symbols
box.go4 symbols
circle_test.go3 symbols
response_test.go2 symbols

For agents

$ claude mcp add collision2d \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact