![]() |
Vector
use Vector;
use Vector qw(:all);
Vector class provides the following methods:
new, AddValues, Copy, GetLength, GetMagnitude, GetSize, GetValue, GetValues , GetX, GetXYZ, GetY, GetZ, IsVector, Normalize, SetValue, SetValuePrintFormat , SetX, SetXYZ, SetY, SetZ, StringifyVector, IsVector
The following functions are available:
IsVector, SetValuePrintFormat UnitXVector, UnitYVector, UnitZVector, UnitVector, ZeroVector
The following operators are overloaded:
Creates a new Vector object containing Values and returns NewVector object. In case no Values are specified, an empty Vector is created.
Add values to Vector using an array, reference to an array or another vector and returns Vector.
Creates a copy of Vector and returns NewVector
Returns Lengh of a 3D Vector corresponding to its dot product
Returns Lengh of a 3D Vector corresponding to its dot product
Returns size of a Vector corresponding to number of its values
Returns vector Value specified using Index starting at 0.
Returns an array or a reference to an array containing all Vector values.
Returns X value of a 3D Vector
Returns XYZ values of a 3D Vector as an array or a reference to an array containing the values
Returns Y value of a 3D Vector
Returns Z value of a 3D Vector
Returns 1 or 0 based on whether Object is a Vector object
Normalizes a 3D Vector by dividing its values by the length and returns Vector
Sets a Vector value specified by Index to Value and returns Vector
Sets format for printing vector values for a specified Vector or the whole class. Default format: %g.
Sets X value of a 3D vector to Value and returns Vector
Sets XYZ values of a 3D vector and returns Vector
Sets Y value of a 3D vector to Value and returns Vector
Sets Z value of a 3D vector to Value and returns Vector
Returns a string containing information about Vector object
Returns a UnitVector of Size. Default size: 3.
Returns a 3D UnitXVector
Returns a 3D UnitYVector
Returns a 3D UnitZVector
Returns a ZeroVector of Size. Default size: 3
Copyright (C) 2004-2008 Manish Sud. All rights reserved.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.