View Issue Details

IDProjectCategoryView StatusLast Update
0009893New Feature Requests[All Projects] Generalpublic2018-07-10 11:49
ReporterPirulaxAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Summary0009893: Add ability to sub/multiply/add/devide/compare different type of vectors.
Description

Every time I use vectors I just hit the problem, that I can't sub/multiply/add/devide/compare vectors of different type.
So, it would be useful to add the mentioned features, because creating a new Vector2 to sub it from another vector2 is dumb, isn't it?
It would be just easier to do like Vector2 - Vector3 and the result would be a Vector3.

TagsNo tags attached.

Activities

qaisjp

2018-07-04 13:33

administrator   ~~0026603

What would you expect (1,2) - (10, 11, 12) to return?

Bonus1702

2018-07-04 13:40

reporter   ~~0026604

I think always the last ones, which are too much, have to be ignored.
(1, 2) - (10, 11, 12) = (-9, -9)
(1, 2) - (10, 11, 12, 13) = (-9, -9)

Pirulax

2018-07-04 14:41

viewer   ~~0026605

@qaisjp
1-10 and 2-11, so Vector3(-9, -9, 12)

Pirulax

2018-07-04 14:42

viewer   ~~0026606

Or actually, its a good question.
If you sub a vector3 from a vector2 as you wrote, it should return a vector2, but if you sub a vector2 from a vector3 it should return vector3.
I think.

Bonus1702

2018-07-04 14:43

reporter   ~~0026607

Ye that would be good.

Pirulax

2018-07-04 14:44

viewer   ~~0026608

And maybe add a feature like .setXYZ, and .getXYZ, i tried to implement it once, but i reverted it(I added some other stuff too, and i was unable to get it working)

qaisjp

2018-07-04 17:34

administrator   ~~0026609

vec.x = 5; etc should work

Pirulax

2018-07-10 11:49

viewer   ~~0026680

It should be like this:
.toVector3() or toVector2(), or toVector4, whatever, you got it.

Issue History

Date Modified Username Field Change