"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > "Bald Eagle" <cre### [at] netscapenet> wrote:
> >
> > > I'm fuzzily thinking that maybe
> > > there's a way to disambiguate a 5D vector and a scalar by adding and/or
> > > multiplying with vectors containing different signs and testing the result?
> > >
> > > My brain is also giving me the impression that binary math and things like (I
> > > said _like_) bitmasks and xor might offer inspiration for a solution.
> >...
> >...
> > Now, you know what to do: Take it and Break it.
>
> I followed your multiplication suggestion - and ended up with this, which after
> some initial tests seems to work:
>...
Btw.: The Official Windows POV-Ray v3.7 says that 1e16 + 1 = 1e16.
Therefore I tested the macros I just posted with the scalar value 1e17, and they
both think that it is a 2D vector.
So these solutions are not numerical robust.
Perhaps we need an istype() function like jr suggested.
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
Post a reply to this message
|