real dotProduct(vector4d other) |
Returns the scalar real result of the dot product of this vector4d with the other vector4d |
var a = Qt.vector4d(1,2,3,4);
var b = Qt.vector4d(5,6,7,8);
var c = a.dotProduct(b);
console.log(c); |
vector4d times(matrix4x4 matrix) |
Returns the vector4d result of transforming this vector4d with the 4x4 matrix with the matrix applied post-vector |
var a = Qt.vector4d(1,2,3,4);
var b = Qt.matrix4x4(4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19);
var c = a.times(b);
console.log(c.toString()); |
vector4d times(vector4d other) |
Returns the vector4d result of multiplying this vector4d with the other vector4d |
var a = Qt.vector4d(1,2,3,4);
var b = Qt.vector4d(5,6,7,8);
var c = a.times(b);
console.log(c.toString()); |
vector4d times(real factor) |
Returns the vector4d result of multiplying this vector4d with the scalar factor
|
var a = Qt.vector4d(1,2,3,4);
var b = 4.48;
var c = a.times(b);
console.log(c.toString());
13.44, 17.92) |
vector4d plus(vector4d other) |
Returns the vector4d result of the addition of this vector4d with the other vector4d |
var a = Qt.vector4d(1,2,3,4);
var b = Qt.vector4d(5,6,7,8);
var c = a.plus(b);
console.log(c.toString()); |
vector4d minus(vector4d other) |
Returns the vector4d result of the subtraction of other vector4d from this vector4d |
var a = Qt.vector4d(1,2,3,4);
var b = Qt.vector4d(5,6,7,8);
var c = a.minus(b);
console.log(c.toString()); |
vector4d normalized() |
Returns the normalized form of this vector |
var a = Qt.vector4d(1,2,3,4);
var b = a.normalized();
console.log(b.toString());
|
real length() |
Returns the scalar real value of the length of this vector3d |
var a = Qt.vector4d(1,2,3,4);
var b = a.length();
console.log(b.toString()); |
vector2d toVector2d() |
Returns the vector2d result of converting this vector4d to a vector2d |
var a = Qt.vector4d(1,2,3,4);
var b = a.toVector2d();
console.log(b.toString()); |
vector3d toVector3d() |
Returns the vector3d result of converting this vector4d to a vector3d |
var a = Qt.vector4d(1,2,3,4);
var b = a.toVector3d();
console.log(b.toString()); |
bool fuzzyEquals(vector4d other, real epsilon) |
Returns true if this vector4d is approximately equal to the other vector4d. The approximation will be true if each attribute of this is within epsilon of other . Note that epsilon is an optional argument, the default epsilon is 0.00001. |
var a = Qt.vector4d(1,2,3,4);
var b = Qt.vector4d(1.0001, 1.9998, 2.0001, 3.9999);
var c = a.fuzzyEquals(b);
var d = a.fuzzyEquals(b, 0.005);
console.log(c + " " + d); |