-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathVec.java
More file actions
29 lines (23 loc) · 797 Bytes
/
Vec.java
File metadata and controls
29 lines (23 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// automatically generated by the FlatBuffers compiler, do not modify
package battlecode.schema;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
/**
* A vector in two-dimensional space. Discrete space, of course.
* Defaults to the 0 vector.
*/
public final class Vec extends Struct {
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public Vec __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public int x() { return bb.getInt(bb_pos + 0); }
public int y() { return bb.getInt(bb_pos + 4); }
public static int createVec(FlatBufferBuilder builder, int x, int y) {
builder.prep(4, 8);
builder.putInt(y);
builder.putInt(x);
return builder.offset();
}
}