comp.lang.ada
 help / color / mirror / Atom feed
From: "ldries46" <bertus.dries@planet.nl>
Subject: Re: Incorrect error?
Date: Mon, 18 Jul 2011 13:46:18 +0200
Date: 2011-07-18T13:46:18+02:00	[thread overview]
Message-ID: <4e241d2d$0$2577$703f8584@news.kpn.nl> (raw)
In-Reply-To: <4e240690$0$6538$9b4e6d93@newsspool4.arcor-online.net>

I just was converting a C++ program with the function VecCross The 
suggestion in that program was that a Cross vector was the result of a 
vector product.

L. Dries


"Georg Bauhaus"  schreef in bericht 
news:4e240690$0$6538$9b4e6d93@newsspool4.arcor-online.net...

On 18.07.11 11:45, stefan-lucks@see-the.signature wrote:
> On Mon, 18 Jul 2011, ldries46 wrote:
>
> [...]
>>   a      : Real_Vector(0 .. 2);
>>   b      : Real_Vector(0 .. 2);
>>   cross  : Real_Vector(0 .. 2);
>> begin
> [...]
>>     Cross := a * b; -- VecCross( a, b, Cross ); <---------------- line 65 
>> the
>
> Why do you expect the product of two vectors to be an vector?

For a vector product, if a ⨯ b is to be one, I find the expectation
quite justified.  Confusion is what we get in return for Ada overloading
ASCII punctuation, in this case "*".  ;-)  (Wolfram's title is
"cross product", http://mathworld.wolfram.com/CrossProduct.html
IIUC.) 




  reply	other threads:[~2011-07-18 11:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  8:47 Incorrect error? ldries46
2011-07-18  9:45 ` stefan-lucks
2011-07-18 10:10   ` Georg Bauhaus
2011-07-18 11:46     ` ldries46 [this message]
2011-07-18 10:40   ` AdaMagica
2011-07-18 12:39     ` Dmitry A. Kazakov
2011-07-18 12:45     ` stefan-lucks
2011-07-18 13:24       ` stefan-lucks
2011-07-18 10:39 ` Nicholas Collin Paul de Glouceſter
2011-07-18 15:58 ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox