Skip to content

Commit

Permalink
Semantics: rename coordinates to vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
g-andrade committed Mar 16, 2024
1 parent 8836f6c commit bab1977
Show file tree
Hide file tree
Showing 4 changed files with 1,006 additions and 1,261 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ your\_application.app.src
]}
```

##### 2\. Encode and decode your coordinates
##### 2\. Encode and decode your vectors

2d points

```erlang
Config = erlzord:config(#{
dimensions => 2,
min_coordinate_value => -1000,
max_coordinate_value => +1000
min_component => -1000,
max_component => +1000
}),

1595729 = erlzord:encode({245, -456}, Config),
Expand All @@ -61,8 +61,8 @@ Config = erlzord:config(#{
```erlang
Config = erlzord:config(#{
dimensions => 3,
min_coordinate_value => 0,
max_coordinate_value => 100
min_component => 0,
max_component => 100
}),

123788 = erlzord:encode({42, 52, 21}, Config),
Expand All @@ -74,8 +74,8 @@ Config = erlzord:config(#{
```erlang
Config = erlzord:config(#{
dimensions => 10,
min_coordinate_value => 0,
max_coordinate_value => 700
min_component => 0,
max_component => 700
}),

740763791023146735114306653082 =
Expand All @@ -100,15 +100,15 @@ mix.exs
end
```

##### 2\. Encode and decode your coordinates
##### 2\. Encode and decode your vectors

2d points

```elixir
config = :erlzord.config(%{
dimensions: 2,
min_coordinate_value: -1000,
max_coordinate_value: +1000
min_component: -1000,
max_component: +1000
})

1595729 = :erlzord.encode({245,-456}, config)
Expand All @@ -120,8 +120,8 @@ config = :erlzord.config(%{
```elixir
config = :erlzord.config(%{
dimensions: 3,
min_coordinate_value: 0,
max_coordinate_value: 100
min_component: 0,
max_component: 100
}),

123788 = :erlzord.encode({42,52,21}, config)
Expand All @@ -133,8 +133,8 @@ config = :erlzord.config(%{
```elixir
config = erlzord:config(%{
dimensions: 10,
min_coordinate_value: 0,
max_coordinate_value: 700
min_component: 0,
max_component: 700
}),

740763791023146735114306653082 =
Expand Down
Loading

0 comments on commit bab1977

Please sign in to comment.