Skip to content

Commit 4129f3d

Browse files
committed
Update readme
1 parent 27bc31f commit 4129f3d

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

CHANGELOG.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88

99
## [Unreleased](https://github.com/gravitton/geometry/compare/v1.0.0...master)
10+
11+
12+
## v1.0.0 (2025-10-17)
1013
### Added
11-
- `Point`
12-
- `Vector`
13-
- `Size`
14-
- `Line`
15-
- `Circle`
16-
- `Rectangle`
17-
- `Polygon`
18-
- `RegularPolygon`
19-
- `Matrix`
20-
- `Padding`
14+
- Added new generic geometry primitives:
15+
- `Point`
16+
- `Vector`
17+
- `Size`
18+
- `Line`
19+
- `Circle`
20+
- `Rectangle`
21+
- `Polygon`
22+
- `RegularPolygon`
23+
- `Matrix`
24+
- `Padding`
25+
- Added type alias packages `ints` for `Int` and `floats` as `float64`
26+
- Added collision detection functions

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ go get github.com/gravitton/geometry
2424
## Usage
2525

2626
```go
27+
package main
28+
2729
import (
2830
geom "github.com/gravitton/geometry"
2931
)
@@ -42,6 +44,8 @@ func (l HexLayout) FromPixel(pixel geom.Point[float64]) (Q, R float64) {
4244
It also provide packages for type aliases ([`ints`](./types/ints/types.go) for `int` and [`floats`](./types/floats/types.go) for `float64`).
4345

4446
```go
47+
package main
48+
4549
import (
4650
"github.com/gravitton/geometry/types/floats"
4751
"github.com/gravitton/geometry/types/ints"
@@ -226,7 +230,7 @@ func (s Size[T]) Shrink(amount T) Size[T]
226230
func (s Size[T]) ShrinkXY(amountX, amountY T) Size[T]
227231

228232
// Utilities
229-
func (s Size[T]) Equal(other Size[T]) bool
233+
func (s Size[T]) Equal(size Size[T]) bool
230234
func (s Size[T]) IsZero() bool
231235
func (s Size[T]) Vector() Vector[T]
232236
func (s Size[T]) Int() Size[int]
@@ -304,12 +308,13 @@ func (r Rectangle[T]) Grow(amount T) Rectangle[T]
304308
func (r Rectangle[T]) GrowXY(amountX, amountY T) Rectangle[T]
305309
func (r Rectangle[T]) Shrink(amount T) Rectangle[T]
306310
func (r Rectangle[T]) ShrinkXY(amountX, amountY T) Rectangle[T]
311+
func (r Rectangle[T]) Inset(padding Padding[T]) Rectangle[T]
307312

308313
// Geometric queries
309314
func (r Rectangle[T]) Contains(point Point[T]) bool
310315

311316
// Utilities
312-
func (r Rectangle[T]) Equal(other Rectangle[T]) bool
317+
func (r Rectangle[T]) Equal(rectangle Rectangle[T]) bool
313318
func (r Rectangle[T]) IsZero() bool
314319
func (r Rectangle[T]) Bounds() Rectangle[T]
315320
func (r Rectangle[T]) Polygon() Polygon[T]
@@ -337,7 +342,7 @@ func (l Line[T]) Direction() Vector[T]
337342
func (l Line[T]) Length() float64
338343

339344
// Utilities
340-
func (l Line[T]) Equal(other Line[T]) bool
345+
func (l Line[T]) Equal(line Line[T]) bool
341346
func (l Line[T]) IsZero() bool
342347
func (l Line[T]) Bounds() Rectangle[T]
343348
func (l Line[T]) Int() Line[int]
@@ -362,6 +367,8 @@ func (p Polygon[T]) Scale(factor float64) Polygon[T]
362367
func (p Polygon[T]) ScaleXY(factorX, factorY float64) Polygon[T]
363368

364369
// Utilities
370+
func (p Polygon[T]) Equal(polygon Polygon[T]) bool
371+
func (p Polygon[T]) IsZero() bool
365372
func (p Polygon[T]) Empty() bool
366373
func (p Polygon[T]) Int() Polygon[int]
367374
func (p Polygon[T]) Float() Polygon[float64]

0 commit comments

Comments
 (0)