vector element arithmetic

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

vector element arithmetic

jdawgaz
This gives me an error. Any way of doing this?

v[2] = v[2] * 2;

Is the only way of doing this:

v1 = [v[0], v[1], v[2]*2];
and use v1?

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: vector element arithmetic

nophead
Yes, you can never change a variable in OpenSCAD, even if it is a vector.

On 12 July 2017 at 18:51, Jerry Davis <[hidden email]> wrote:
This gives me an error. Any way of doing this?

v[2] = v[2] * 2;

Is the only way of doing this:

v1 = [v[0], v[1], v[2]*2];
and use v1?

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org