Back to project page touchgloid.
The source code is released under:
MIT License
If you think the Android project touchgloid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package rucamzu.opengl; //w w w . j av a 2s.c om public class Vector { private final float[] elements; private Vector() { elements = new float[4]; } private Vector(float[] elements) { this.elements = elements; } public static Vector create() { return create(0.0f, 0.0f, 0.0f, 1.0f); } public static Vector create(float x, float y, float z, float w) { Vector vector = new Vector(); vector.elements[0] = x; vector.elements[1] = y; vector.elements[2] = z; vector.elements[3] = w; return vector; } public float x() { return elements[0]; } public float y() { return elements[1]; } public float z() { return elements[2]; } public float w() { return elements[3]; } public float[] getElements() { return elements; } }