https://github.com/yglukhov/kiwi
Constraint solving library
https://github.com/yglukhov/kiwi
Last synced: 7 months ago
JSON representation
Constraint solving library
- Host: GitHub
- URL: https://github.com/yglukhov/kiwi
- Owner: yglukhov
- License: mit
- Created: 2016-12-30T11:43:38.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-27T18:11:03.000Z (about 2 years ago)
- Last Synced: 2024-10-14T15:04:54.984Z (12 months ago)
- Language: Nim
- Size: 24.4 KB
- Stars: 51
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kiwi [](https://github.com/yglukhov/kiwi/actions?query=branch%3Amaster) [](https://github.com/yglukhov/nimble-tag)
A Nim port of the [kiwi-java](https://github.com/alexbirkett/kiwi-java) implementation of the Cassowary constraint solving algorithm
## Usage
```nim
import kiwilet s = newSolver()
let x = newVariable()
let y = newVariable()s.addConstraint(x == 20)
s.addConstraint(x + 2 == y + 10)
s.updateVariables()assert(x.value == 20)
assert(y.value == 12)
```# Links
* [overconstrained.io](http://overconstrained.io) - collection of similar projects ([github](https://github.com/Overconstrained/Overconstrained))