can vectors not be subtracted?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

can vectors not be subtracted?

Ethan Gardener
        vector v = <32., 1248., 87.65> - <35.623466, 1234.477051, 22.>;
(6,70) syntax error

can you not do this, so you have to subtract each element individually?  it's been a years since i last tried.

--
Progress might have been all right once, but it has gone on too long -- Ogden Nash
_______________________________________________
Opensim-users mailing list
[hidden email]
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: can vectors not be subtracted?

Markus
On 2018-11-26 11:47, Ethan Gardener wrote:
>          vector v = <32., 1248., 87.65> - <35.623466, 1234.477051, 22.>;
> (6,70) syntax error
>
> can you not do this, so you have to subtract each element individually?  it's been a years since i last tried.
>

You can subtract vectors, however something like "32." will cause a
syntax error. Write "32.0" or "32" instead. I think that is your problem.
_______________________________________________
Opensim-users mailing list
[hidden email]
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: can vectors not be subtracted?

Ethan Gardener
On Mon, Nov 26, 2018, at 4:57 PM, Markus wrote:
> On 2018-11-26 11:47, Ethan Gardener wrote:
> >          vector v = <32., 1248., 87.65> - <35.623466, 1234.477051, 22.>;
>
> You can subtract vectors, however something like "32." will cause a
> syntax error. Write "32.0" or "32" instead. I think that is your problem.

That was the first thing I tried.  "32." should be accepted (ugly as it is) because it's very common to represent floating point constants in that way, and it is the format in which viewers copy vectors to the clipboard.
_______________________________________________
Opensim-users mailing list
[hidden email]
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users