Class: Numeric

Inherits:
Object show all
Includes:
Cassowary::Equalities
Defined in:
lib/ext/numeric.rb

Overview

Copyright © 2012 by Tim Felgentreff

Instance Method Summary collapse

Methods included from Cassowary::Equalities

#cn_equal, #cn_geq, #cn_leq

Instance Method Details

#as_linear_expressionObject



6
7
8
9
10
# File 'lib/ext/numeric.rb', line 6

def as_linear_expression
  expr = Cassowary::LinearExpression.new
  expr.constant = self.to_f
  expr
end