imagine-node
module to work with complex numbers
Install
npm install imagine-node
Usage
const complex = 1 1;complex // 1+iconst chainingComplex = complex ;;;ç complex // Definitions and usage examples { return this ;} { return this ;} { return this ;} { return Complex ;} { return this ;}
API imagineClass(real, imaginary)
Properties
real Number
imaginary Number
ClassMethods
add({real, imaginary}, {real, imaginary}) -> imagineInstance
sub({real, imaginary}, {real, imaginary}) -> imagineInstance
div({real, imaginary}, {real, imaginary}) -> imagineInstance
multiply({real, imaginary}, {real, imaginary}) -> imagineInstance
ln({real, imaginary}) -> imagineInstance
cos({real, imaginary}) -> imagineInstance
asin({real, imaginary}) -> imagineInstance
acos({real, imaginary}) -> imagineInstance
sinh({real, imaginary}) -> imagineInstance
cosh({real, imaginary}) -> imagineInstance
atang({real, imaginary}) -> imagineInstance
norm({real, imaginary}) -> number
polar({real, imaginary}) -> {norm, theta}
theta({real, imaginary}) -> number
sin({real, imaginary}) -> imagineInstance
pow({real, imaginary}, {real, imaginary}) -> imagineInstance
sqrt({real, imaginary},integer) ->ArrayOfImagineInstance
inverse({real, imaginary}) ->imagineInstance
im(number) -> imagineInstance
return a complex number with only imaginary part equal to number given
toString({real, imaginary}) -> string
re(number) -> imagineInstance
return a complex number with only real part equal to number given
return a imaginary number
InstanceMethods
add({real, imaginary}) -> imagineInstance
sub({real, imaginary}) -> imagineInstance
div({real, imaginary}) -> imagineInstance
multiply({real, imaginary}) -> imagineInstance
ln() -> imagineInstance
cos() -> imagineInstance
sin() -> imagineInstance
cosh() -> imagineInstance
sinh() -> imagineInstance
norm() -> number
polar() -> {norm, theta}
theta() -> number
asin() -> imagineInstance
acos() -> imagineInstance
atang() -> imagineInstance
pow({real, imaginary}) -> imagineInstance
sqrt(integer) ->ArrayOfImagineInstance
inverse() ->imagineInstance
im() -> imagineInstance
return a complex number with only imaginary part
toString() -> string
re() -> imagineInstance
return a complex number with only real part