Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- At=Struct.new(:a, :al, :b) do
- def +(other)
- At.new(
- self.a + other.a
- self.al + other.al
- self.b + other.b
- )
- end
- end
- alph = At.new(4.0, 3.0, 1.0)
- blph = At.new(6.0, 3.0, 1.0)
- clph = alph + blph
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement