Method: ECC::Point.add
- Defined in:
- lib/elliptic-lite/point.rb
.add(*nums) ⇒ Object
convenience helpers - field operations
7 8 9 10 |
# File 'lib/elliptic-lite/point.rb', line 7 def self.add( *nums ) ## note: for convenience allow additions of more than two numbers sum = nums.shift ## "pop" first item from array nums.reduce( sum ) {|sum, num| curve.f.add( sum, num ) } end |