Error in Quaternion Constructor

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
PhantorGorth
---- E L I T E ----
---- E L I T E ----
Posts: 647
Joined: Wed May 20, 2009 6:48 pm
Location: Somewhere off the top left of Galaxy 1 map

Error in Quaternion Constructor

Post by PhantorGorth »

According to the wiki the Quaternion class construction if provided no values will return the identity rotation (1 + 0i + 0j + 0k). Which would be useful starting point. Unfortunately it returns (0 +0i + 0j + 0k) instead.

Debug Console output:

Code: Select all

> q = new Quaternion()
(0 + 0i + 0j + 0k)
This was tested on v1.76.1 on Linux. I have not tested it under 1.77 yet.

Phantor
Chat and relax with other commanders in the [url=irc://irc.oftc.net/oolite]DS's Seedy Space Bar[/url]. The Coolest Bar in the Eight.

Phantor's OXPs: [EliteWiki] GalCop Rewards and [EliteWiki] Safe Docking
User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

Re: Error in Quaternion Constructor

Post by Ironfist »

I checked the latest trunk version 1.77.5610. It is delivering the same all zero answer so I think it is a far bet that 1.77 will do the same.

Ironfist
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Error in Quaternion Constructor

Post by cim »

Hmm. So change the constructor to match the docs, or change the docs to match the constructor? I can't imagine any code is relying on the constructor producing a 0 quaternion, so it's probably best here to change the constructor to match the docs. I'll add it to the list.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Error in Quaternion Constructor

Post by Eric Walch »

cim wrote:
...so it's probably best here to change the constructor to match the docs. I'll add it to the list.
(0,0,0,0) is also not a correct normalised Quaternion, so one reason more to change it into (1,0,0,0) as default value.
Post Reply