This is one example, there are several others with the same error in math.vector.ts
/**
* Negate the current Vector3 and stores the result in the given vector "result" coordinates
* Example Playground https://playground.babylonjs.com/#R1F8YU#37
* @param result defines the Vector3 object where to store the result
* @returns the current Vector3
*/
public negateToRef(result: Vector3): Vector3 {
return result.copyFromFloats(this._x * -1, this._y * -1, this._z * -1);
}
You can see in this PG Babylon.js Playground
that it returns the result vector not the current vector.
current vector {X: 1 Y: 2 Z: 3}
result vector {X: -1 Y: -2 Z: -3}
returned vector {X: -1 Y: -2 Z: -3}