Page MenuHome

Ruben De Smet (rubdos)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 20 2016, 12:33 PM (368 w, 1 d)

Recent Activity

Feb 5 2016

Ruben De Smet (rubdos) added a comment to D1743: Implement vec/vec element wise division.

So, ... Any update on this? Would be nice to see it in one of the next releases ^^

Feb 5 2016, 7:48 PM · Add-ons (BF-Blender), BF Blender

Jan 21 2016

Ruben De Smet (rubdos) added a comment to D1743: Implement vec/vec element wise division.

I agree with @Campbell Barton (campbellbarton) here - we cannot have different behaviors/meanings for * and /, those two ops are universally expected to be “symmetric” I think?

However, it is also true that dot product is maybe the most common vec operation, and that removing that will also break probably quite a bit of code.

So we could also decide to not use / op for vector by vector division, and instead add v.divide(v)?

Side note: if we search for references, think NumPY is also nice to look at - afaict, they only have a named func for dot products? * and / operations over arrays just perform element-wise multiplication/division.

Jan 21 2016, 10:36 AM · Add-ons (BF-Blender), BF Blender
Ruben De Smet (rubdos) added a comment to D1743: Implement vec/vec element wise division.

Something awkward here is that a * b for 2 vectors currently returns the dot product.

Am not too comfortable to make a * b have very different meaning to a / b.

Probably best to use element wise multiplication too, and dot product can just use the a.dot(b) form (this is what numpy does).

To avoid confusion for this, we would be best to deprecate vec * vec with a warning for at least a release.
Then change the behavior of multiply and divide.

Jan 21 2016, 10:02 AM · Add-ons (BF-Blender), BF Blender

Jan 20 2016

Ruben De Smet (rubdos) retitled D1743: Implement vec/vec element wise division from to Implement vec/vec element wise division.
Jan 20 2016, 1:56 PM · Add-ons (BF-Blender), BF Blender