NAME

Sidef::Types::Number::Quaternion

DESCRIPTION

This class implements ...

SYNOPSIS

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

Inherits methods from:

* Sidef::Types::Number::Number

METHODS

!=

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

a

self.a

Returns the

Aliases: re, real

abs

x.abs

Returns the

b

self.b

Returns the

c

self.c

Returns the

ceil

x.ceil

Returns the

conj

x.conj

Returns the

d

self.d

Returns the

dump

x.dump

Returns the

eval

x.eval(v)

Returns the

float

x.float

Returns the

floor

x.floor

Returns the

inv

x.inv

Returns the

invmod

x.invmod(m)

Returns the

is_coprime

n.is_coprime(k)

Returns the

is_mone

x.is_mone

Returns the

is_one

x.is_one

Returns the

is_zero

x.is_zero

Returns the

lift

x.lift

Returns the

neg

x.neg

Returns the

new

self.new

Returns the

Aliases: call

norm

x.norm

Returns the

parts

self.parts

Returns the

powmod

x.powmod(n, m)

Returns the

pretty

x.pretty

Returns the

Aliases: stringify

reals

self.reals

Returns the

round

x.round(r)

Returns the

sgn

x.sgn

Returns the

sqr

x.sqr

Returns the

to_c

x.to_c

Returns the

Aliases: to_n

to_gauss

x.to_gauss

Returns the

to_s

x.to_s

Returns the