Code example for FloatBuffer

Methods: get

0
		buffer.put(pos + 1, y);
	} 
 
	@Override 
	public void read(FloatBuffer buffer, int pos) {
		x = buffer.get(pos);
		y = buffer.get(pos + 1);
	} 
 
	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
	 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
 
	public Vec2 add(Vec2 rhs) {
		x += rhs.x;
		y += rhs.y;
 
		return this;
	} 
 
	public Vec2 sub(Vec2 rhs) {
		x -= rhs.x;