Say I have two vectors, v and v2. I see elsewhere that I can multiply them together in Haxe like so:

```
v.x *= v2.x;
v.y *= v2.y;
v.z *= v2.z;
```

But can you similarly divide one vector by another like this?

```
v.x /= v2.x;
v.y /= v2.y;
v.z /= v2.z;
```

Say I have two vectors, v and v2. I see elsewhere that I can multiply them together in Haxe like so:

```
v.x *= v2.x;
v.y *= v2.y;
v.z *= v2.z;
```

But can you similarly divide one vector by another like this?

```
v.x /= v2.x;
v.y /= v2.y;
v.z /= v2.z;
```

That depends on whether the vector implementation implements the operator. Haxeâ€™s operator overloading does support both in principle.

Armoryâ€™s vector classes donâ€™t have the operator overloading so that you can use the `*=`

or `/=`

operators on them. It looks like there isnâ€™t a divide function in Armoryâ€™s Vector class either.

Mr Blob multiplies element by element so this doesnâ€™t require operator overloading and consequently the answer is: Yes.

Ah, shouldâ€™ve paid more attention to the code example than the question. He isnâ€™t actually dividing *vectors* there.

1 Like

Yep, thatâ€™s right.