Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #35033
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Trying to do 3D (THIRD TRY) |
| Date | 2018-05-16 23:31 +0200 |
| Organization | solani.org |
| Message-ID | <pdi807$62n$1@solani.org> (permalink) |
| References | <e6827ca4-d196-4e91-a9de-42a8f76dfbb4@googlegroups.com> <ffa518a0-846f-4b94-a03a-f5d84e83e337@googlegroups.com> |
On 16.05.2018 at 14:27, bit-naughty@hotmail.com wrote:
> If I have a global var, "threedpoly", and there is code like this:
>
> function rotatethreedpoly(threedpoly, angle) {
>
>
> for (i=0; i<3; i++) {
> (threedpoly[i].x) = (Math.cos(angle) * threedpoly[i].x) - (Math.sin(angle) * threedpoly[i].z) ;
> // threedpoly[i].y = threedpoly[i].y ;
> (threedpoly[i].z) = (Math.sin(angle) * threedpoly[i].x) + (Math.cos(angle) * threedpoly[i].z) ;
>
> }
>
>
>
>
> , the "threedpoly" that's being referenced on the left hand side - that WILL update the global var "threedpoly", right? Cause that's also what my function argument is called - that's not good, is it? Funny things'll happen, right...? Or won't they...?
Q: “I don't know how to use a screw driver, but surely I can build that
rocket!”
A: “Learn to use the screw driver first.”
HTH :)
--
Christoph M. Becker
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-13 12:35 -0700
Re: Trying to do 3D (THIRD TRY) Leonardo Campos <leonardoscampos@gmail.com> - 2018-05-14 22:29 -0700
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-15 08:15 -0700
Re: Trying to do 3D (THIRD TRY) Leonardo Campos <leonardoscampos@gmail.com> - 2018-05-15 18:10 -0700
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-16 05:23 -0700
Re: Trying to do 3D (THIRD TRY) Leonardo Campos <leonardoscampos@gmail.com> - 2018-05-16 21:38 -0700
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-16 23:18 -0700
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-16 23:47 -0700
Re: Trying to do 3D (THIRD TRY) Leonardo Campos <leonardoscampos@gmail.com> - 2018-05-17 01:03 -0700
Re: Trying to do 3D (THIRD TRY) Leonardo Campos <leonardoscampos@gmail.com> - 2018-05-17 00:56 -0700
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-15 10:48 -0700
Re: Trying to do 3D (THIRD TRY) "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-05-15 12:48 -0700
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-16 05:29 -0700
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-16 05:27 -0700
Re: Trying to do 3D (THIRD TRY) "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-05-16 23:31 +0200
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-16 21:11 -0700
Re: Trying to do 3D (THIRD TRY) "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-05-17 13:35 +0200
Re: Trying to do 3D (THIRD TRY) bit-naughty@hotmail.com - 2018-05-22 05:57 -0700
Re: Trying to do 3D (THIRD TRY) "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-05-22 13:50 -0700
csiph-web