Method: Stick::Quaternion#gcd
- Defined in:
- lib/stick/quaternion.rb
#gcd(other) ⇒ Object
438 439 440 441 442 443 444 445 446 |
# File 'lib/stick/quaternion.rb', line 438 def gcd other a=self; b=other while true if b==0 ; return a;end a=a.rmod_D4(b) if a==0 ; return b;end b=a.lmod_D4(b) end end |