Sidef::Types::Number::Quaternion
This class implements ...
var a = Quaternion(1,2,3,4)
var b = Quaternion(5,6,7,8)
say a+b #=> Quaternion(6, 8, 10, 12)
say a-b #=> Quaternion(-4, -4, -4, -4)
say a*b #=> Quaternion(-60, 12, 30, 24)
say b*a #=> Quaternion(-60, 20, 14, 32)
say a/b #=> Quaternion(35/87, 4/87, 0, 8/87)
Inherits methods from:
* Sidef::Types::Number::Number
a != b
Returns the
Aliases: ne
a % b
Returns the
Aliases: mod
a & b
Returns the
Aliases: and
a * b
Returns the
Aliases: mul
a ** b
Returns the
Aliases: pow
a + b
Returns the
Aliases: add
a ++ b
Returns the
Aliases: inc
a - b
Returns the
Aliases: sub
a -- b
Returns the
Aliases: dec
a / b
Returns the
Aliases: ÷, div
a < b
Returns the
Aliases: lt
a << b
Returns the
Aliases: lsft, shift_left
a <=> b
Returns the
Aliases: cmp
a == b
Returns the
Aliases: eq
a > b
Returns the
Aliases: gt
a >> b
Returns the
Aliases: rsft, shift_right
a ^ b
Returns the
Aliases: xor
a | b
Returns the
Aliases: or
a ≤ b
Returns the
Aliases: <=, le
a ≥ b
Returns the
Aliases: >=, ge
self.a
Returns the
Aliases: re, real
x.abs
Returns the
self.b
Returns the
self.c
Returns the
x.ceil
Returns the
x.conj
Returns the
self.d
Returns the
x.dump
Returns the
x.eval(v)
Returns the
x.float
Returns the
x.floor
Returns the
x.inv
Returns the
x.invmod(m)
Returns the
n.is_coprime(k)
Returns the
x.is_mone
Returns the
x.is_one
Returns the
x.is_zero
Returns the
x.lift
Returns the
x.neg
Returns the
self.new
Returns the
Aliases: call
x.norm
Returns the
self.parts
Returns the
x.powmod(n, m)
Returns the
x.pretty
Returns the
Aliases: stringify
self.reals
Returns the
x.round(r)
Returns the
x.sgn
Returns the
x.sqr
Returns the
x.to_c
Returns the
Aliases: to_n
x.to_gauss
Returns the
x.to_s
Returns the