User:Cron Stardust/LLVector Spec
< User:Cron Stardust
Jump to navigation
Jump to search
Revision as of 19:47, 2 April 2014 by Cron Stardust (talk | contribs) (Starting skeleton - just needs the methods.)
This is a simple specification for all LLVector formats. This does NOT include the LLColor formats.
Everything below is to be considered a minimum compatibility specification. Specific type implementations are free to add extra items as their own use cases dictate.
Every type that is only differentiated from another type by the precision, or number of bits, in its components shall be directly compatible: all such related types are to implement the same public interface.
It is recommended that types be freely convertible between themselves, but this is not a requirement.
Public Static Properties
- zero
- [xyzw]_axis
- [xyzw]_axis_neg
Where you see [xyzw] create one property for each applicable character - a 2D type will only need X and Y for instance.
Public Constructors
- Basic Constructor: ()
- Direct-value Constructor: (x, y, ...)
- Array Constructor: (*vec, len=C) // where C is the expected count of elements in X, Y, Z, W order.
Public Properties
- Array of values: mV or mdV
- Each element in the array represents the, if applicable, X, Y, Z, and W values of the vector.