mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-25 13:30:10 +00:00
Use Seismic function for perf
This commit is contained in:
1 parent
f04c9b3e73
commit
bc1213b220
7 files changed
+22
-12
No files matched your search
+3
-1
@@ -1,5 +1,7 @@
|
||||
package com.dfsek.terra.addons.image.operator;
|
||||
|
||||
import com.dfsek.seismic.math.floatingpoint.FloatingPointFunctions;
|
||||
|
||||
import com.dfsek.terra.addons.image.image.Image;
|
||||
import com.dfsek.terra.addons.image.util.ColorUtil;
|
||||
import com.dfsek.terra.addons.image.util.ColorUtil.Channel;
|
||||
@@ -232,7 +234,7 @@ public class DistanceTransform {
|
||||
@Override
|
||||
public double getSample(long seed, double x, double y) {
|
||||
if(x < 0 || y < 0 || x >= transform.width || y >= transform.height) return transform.minDistance;
|
||||
return transform.distances[(int) Math.floor(x)][(int) Math.floor(y)];
|
||||
return transform.distances[FloatingPointFunctions.floor(x)][FloatingPointFunctions.floor(y)];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user