View difference between Paste ID: pVhyL4UH and 2E89V673
SHOW: | | - or go back to the newest paste.
1
At=Struct.new(:a, :al, :b) do
2
  def +(other)
3
    At.new(
4-
      self.a + other.a
4+
      self.a + other.a,
5-
      self.al + other.al
5+
      self.al + other.al,
6
      self.b + other.b
7
    )
8
  end
9
end
10
11
alph = At.new(4.0, 3.0, 1.0)
12
blph = At.new(6.0, 3.0, 1.0)
13
14
clph = alph + blph