module Cassowary
Overview
An incremental linear constraint solver based on the Cassowary algorithm.
require "cassowary"
left = Cassowary::Variable.new("left")
width = Cassowary::Variable.new("width")
right = Cassowary::Variable.new("right")
solver = Cassowary::Solver.new
solver.add(right == left + width)
solver.add(width >= 100)
solver.add((left == 0).strength(:strong))
solver.add_edit(width, :strong)
solver.suggest(width, 250)
solver.update
right.value # => 250.0
Defined in:
cassowary.crConstant Summary
-
VERSION =
{{ (`shards version \"/home/runner/work/cassowary/cassowary/src\"`).chomp.stringify }}