RobinHankin / onion

R functionality to deal with quaternions and octonions
6 stars 1 forks source link

round() #22

Closed RobinHankin closed 6 months ago

RobinHankin commented 1 year ago

Function round() works nicely for complex numbers:

> (x <- exp(1:3+1i))
[1]  1.468694+ 2.287355i  3.992324+ 6.217676i 10.852262+16.901397i
> round(x)
[1]  1+ 2i  4+ 6i 11+17i
> 

and it should work for quaternions and octonions too.