commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Bosman <stevebos...@gmail.com>
Subject [numbers] Making Quaternion a VALJO
Date Thu, 29 Nov 2018 08:43:22 GMT
Hi

I had a look last night at making Quaternion a VALJO.

I've done the following

* changed the constructors to private and added equivalent of methods.
* added a parse method
* altered equals so that (like Complex) it uses Double.equals - gets round
an edge case where Quaternions with the equivalence of -0 and 0 discovered
while adding tests for hashCode
* added a divide by scalar method
* added a norm2 (square of norm) method
* added some additional unit tests so it should now have 100% coverage

I've raised a pull request, and I have also emailed an ICLA.

I think two convenience divide methods performing qr^{-1} and r^{-1}q for q
and r would be useful, but I couldn't think of nice names for them.

Steve

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message