<commit_before># Hexgrid

This is a GO (Golang) library used to handle regular hexagons.
It's based on the algorithms described at http://www.redblobgames.com/grids/hexagons/implementation.html

## Installation

    go get github.com/pmcxs/hexgrid

## Usage
#### Importing

```go
import "github.com/pmcxs/hexgrid"
```

### Examples

#### Creating an hexagon

```go
hexagon := hexgrid.NewHexgrid(10)
```


## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`<commit_msg>Updated the examples on the readme file<commit_after># Hexgrid

This is a GO (Golang) library used to handle regular hexagons.
It's based on the algorithms described at http://www.redblobgames.com/grids/hexagons/implementation.html

## Installation

    go get github.com/pmcxs/hexgrid

## Usage
#### Importing

```go
import "github.com/pmcxs/hexgrid"
```

### Examples

#### Creating hexagons

```go
hexagonA := NewHex(1,2) //at axial coordinates Q=1 R=2
hexagonB := NewHex(2,3) //at axial coordinates Q=2 R=3
```

#### Measuring distance between hexagons

```go
distance := HexDistance(hexagonA, hexagonB)
```

#### Obtaining the pixel that corresponds to a given hexagon

```go
hex := NewHex(1,0)        // We'll be calculating the pixel that corresponds to the center of hex 1,0     
origin := point {0,0}     // The coordinate that corresponds to the center of hexagon 0,0
size := point {100, 100}  // The length of an hexagon side => 100
pixel := HexToPixel(layout{size:size, origin:origin,orientation:orientationFlat},hex)
```



## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
{'fraction_non_alphanumeric': 0.12727272727272726, 'fraction_numerical': 0.01871657754010695, 'mean_word_length': 4.211699164345404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2693736', 'n_tokens_mistral': 653, 'n_tokens_neox': 594, 'n_words': 214}