Code cleanup and formatting.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / UserRelativityTracker.java
index 00c8832..8708398 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sixth 3D engine. Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Sixth 3D engine. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 3 of the GNU Lesser General Public License
 
 package eu.svjatoslav.sixth.e3d.gui;
 
-import eu.svjatoslav.sixth.e3d.geometry.GeometryCoordinate;
 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
-import eu.svjatoslav.sixth.e3d.geometry.TransformPipe;
+import eu.svjatoslav.sixth.e3d.math.GeometryCoordinate;
+import eu.svjatoslav.sixth.e3d.math.TransformPipe;
 
 public class UserRelativityTracker {
 
-    public final static int minimalSliceFactor = 5;
+    private final static int minimalSliceFactor = 5;
     public GeometryCoordinate center = new GeometryCoordinate();
     public GeometryCoordinate right;
     public GeometryCoordinate down;
@@ -57,8 +57,7 @@ public class UserRelativityTracker {
     }
 
     public double getDistanceToUser() {
-        return center.transformedCoordinate
-                .getDistanceTo(Point3D.ZERO);
+        return center.transformedCoordinate.getVectorLength();
     }
 
     public double proposeSliceFactor() {