Home | History | Annotate | Download | only in dist

Lines Matching defs:vec4

1094  * @name vec4
1097 var vec4 = {};
1100 * Creates a new, empty vec4
1102 * @returns {vec4} a new 4D vector
1104 vec4.create = function() {
1114 * Creates a new vec4 initialized with values from an existing vector
1116 * @param {vec4} a vector to clone
1117 * @returns {vec4} a new 4D vector
1119 vec4.clone = function(a) {
1129 * Creates a new vec4 initialized with the given values
1135 * @returns {vec4} a new 4D vector
1137 vec4.fromValues = function(x, y, z, w) {
1147 * Copy the values from one vec4 to another
1149 * @param {vec4} out the receiving vector
1150 * @param {vec4} a the source vector
1151 * @returns {vec4} out
1153 vec4.copy = function(out, a) {
1162 * Set the components of a vec4 to the given values
1164 * @param {vec4} out the receiving vector
1169 * @returns {vec4} out
1171 vec4.set = function(out, x, y, z, w) {
1180 * Adds two vec4's
1182 * @param {vec4} out the receiving vector
1183 * @param {vec4} a the first operand
1184 * @param {vec4} b the second operand
1185 * @returns {vec4} out
1187 vec4.add = function(out, a, b) {
1196 * Subtracts two vec4's
1198 * @param {vec4} out the receiving vector
1199 * @param {vec4} a the first operand
1200 * @param {vec4} b the second operand
1201 * @returns {vec4} out
1203 vec4.subtract = function(out, a, b) {
1212 * Alias for {@link vec4.subtract}
1215 vec4.sub = vec4.subtract;
1218 * Multiplies two vec4's
1220 * @param {vec4} out the receiving vector
1221 * @param {vec4} a the first operand
1222 * @param {vec4} b the second operand
1223 * @returns {vec4} out
1225 vec4.multiply = function(out, a, b) {
1234 * Alias for {@link vec4.multiply}
1237 vec4.mul = vec4.multiply;
1240 * Divides two vec4's
1242 * @param {vec4} out the receiving vector
1243 * @param {vec4} a the first operand
1244 * @param {vec4} b the second operand
1245 * @returns {vec4} out
1247 vec4.divide = function(out, a, b) {
1256 * Alias for {@link vec4.divide}
1259 vec4.div = vec4.divide;
1262 * Returns the minimum of two vec4's
1264 * @param {vec4} out the receiving vector
1265 * @param {vec4} a the first operand
1266 * @param {vec4} b the second operand
1267 * @returns {vec4} out
1269 vec4.min = function(out, a, b) {
1278 * Returns the maximum of two vec4's
1280 * @param {vec4} out the receiving vector
1281 * @param {vec4} a the first operand
1282 * @param {vec4} b the second operand
1283 * @returns {vec4} out
1285 vec4.max = function(out, a, b) {
1294 * Scales a vec4 by a scalar number
1296 * @param {vec4} out the receiving vector
1297 * @param {vec4} a the vector to scale
1299 * @returns {vec4} out
1301 vec4.scale = function(out, a, b) {
1310 * Calculates the euclidian distance between two vec4's
1312 * @param {vec4} a the first operand
1313 * @param {vec4} b the second operand
1316 vec4.distance = function(a, b) {
1325 * Alias for {@link vec4.distance}
1328 vec4.dist = vec4.distance;
1331 * Calculates the squared euclidian distance between two vec4's
1333 * @param {vec4} a the first operand
1334 * @param {vec4} b the second operand
1337 vec4.squaredDistance = function(a, b) {
1346 * Alias for {@link vec4.squaredDistance}
1349 vec4.sqrDist = vec4.squaredDistance;
1352 * Calculates the length of a vec4
1354 * @param {vec4} a vector to calculate length of
1357 vec4.length = function (a) {
1366 * Alias for {@link vec4.length}
1369 vec4.len = vec4.length;
1372 * Calculates the squared length of a vec4
1374 * @param {vec4} a vector to calculate squared length of
1377 vec4.squaredLength = function (a) {
1386 * Alias for {@link vec4.squaredLength}
1389 vec4.sqrLen = vec4.squaredLength;
1392 * Negates the components of a vec4
1394 * @param {vec4} out the receiving vector
1395 * @param {vec4} a vector to negate
1396 * @returns {vec4} out
1398 vec4.negate = function(out, a) {
1407 * Normalize a vec4
1409 * @param {vec4} out the receiving vector
1410 * @param {vec4} a vector to normalize
1411 * @returns {vec4} out
1413 vec4.normalize = function(out, a) {
1430 * Calculates the dot product of two vec4's
1432 * @param {vec4} a the first operand
1433 * @param {vec4} b the second operand
1436 vec4.dot = function (a, b) {
1441 * Performs a linear interpolation between two vec4's
1443 * @param {vec4} out the receiving vector
1444 * @param {vec4} a the first operand
1445 * @param {vec4} b the second operand
1447 * @returns {vec4} out
1449 vec4.lerp = function (out, a, b, t) {
1462 * Transforms the vec4 with a mat4.
1464 * @param {vec4} out the receiving vector
1465 * @param {vec4} a the vector to transform
1467 * @returns {vec4} out
1469 vec4.transformMat4 = function(out, a, m) {
1479 * Transforms the vec4 with a quat
1481 * @param {vec4} out the receiving vector
1482 * @param {vec4} a the vector to transform
1484 * @returns {vec4} out
1486 vec4.transformQuat = function(out, a, q) {
1507 * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
1515 vec4.forEach = (function() {
1516 var vec = vec4.create();
1547 * @param {vec4} vec vector to represent as a string
1550 vec4.str = function (a) {
1551 return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
1555 exports.vec4 = vec4;
3442 quat.clone = vec4.clone;
3454 quat.fromValues = vec4.fromValues;
3464 quat.copy = vec4.copy;
3477 quat.set = vec4.set;
3521 quat.add = vec4.add;
3557 quat.scale = vec4.scale;
3649 quat.dot = vec4.dot;
3661 quat.lerp = vec4.lerp;
3758 quat.length = vec4.length;
3773 quat.squaredLength = vec4.squaredLength;
3789 quat.normalize = vec4.normalize;