Sha256: 33614dccb613a25f92a2f71eadb933108a4cf5edb8af0211a4825eee6d509f15
Contents?: true
Size: 396 Bytes
Versions: 48
Compression:
Stored size: 396 Bytes
Contents
module GridGenerator class Scaler def initialize(horizontal_scale: 1, vertical_scale: 1) @horizontal_scale = horizontal_scale @vertical_scale = vertical_scale @matrix = Matrix[ [horizontal_scale,0], [0,vertical_scale] ] end attr_reader :horizontal_scale, :vertical_scale, :matrix def scale(point) matrix * point end end end
Version data entries
48 entries across 48 versions & 1 rubygems