|Re: [eigen] cross product with complex vectors|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] cross product with complex vectors
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Mon, 16 Jul 2018 17:09:00 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=MIQBsCs0qHrjwfvRrNAb1vkO++eVFZ3YnxYHVH1vvg4=; b=IHacoPuZNGB+v2ojVnoZrxQBaPk8GM260lqVQe+Sskm2rNQMoKnxNAkqBtDb5czX0R 08L/IKlIE7+tXplxYrjYi5kzDeOqOqCVVrUbH0YPalGtK+A+scABLgDjAe8BKjx5cYMZ oaf70Ou0aDkX8kiW4FHHPgk5mgGxPpK2XW13Cw2cZkpWVBRHV7s9uOt8G6bNZPMgQnGv rDcFp87kOU8t9vm5p7h73/85vVwSZA69SrUbjmOdHDCQ0zyW+u4Stmdes4Nd3Ui11gmL TMEOjHQfx5Xi1WSIMLmlTiApfxQsM0pLsVIhefAgkGd7QQXCFkZP4HGkoS/5+fLeEsMv +FBg==
I was wondering whether the implementation of the cross product for
complex vectors  is correct.
Assume I have two vectors of type Vector3cd which hold a=(0,0,1) and
b=(0,1+i,0). I do a.cross(b) and would expect to get (-1-i,0,0) but get
(-1+i,0,0) as a result.
I think the formula in  should be (a + ib) x (c x id) = (a x c - b x
d) + i (a x d + b x c) but maybe I am wrong.
It would be great if somebody could provide some sanity check or the
reasoning behind .
Thanks for helping,