MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / translateUp

Method translateUp

src/main/java/field/graphics/Camera.java:261–273  ·  view source on GitHub ↗
(float r)

Source from the content-addressed store, hash-verified

259 return s;
260 }
261
262 public State translateUp(float r) {
263 State s = copy();
264 Vec3 left = up;
265 left = left.normalize();
266 left.mul((float) position.distance(target));
267 s.position.x += left.x * r;
268 s.position.y += left.y * r;
269 s.position.z += left.z * r;
270 s.target.x += left.x * r;
271 s.target.y += left.y * r;
272 s.target.z += left.z * r;
273 return s;
274 }
275
276 public Vec3 position(float stereoSide) {

Callers

nothing calls this directly

Calls 4

copyMethod · 0.95
normalizeMethod · 0.95
mulMethod · 0.95
distanceMethod · 0.45

Tested by

no test coverage detected