Redundant cast cleanup
This commit is contained in:
@@ -103,11 +103,11 @@ public abstract class GenerateFilter{
|
|||||||
//TODO would be nice if these functions used the seed and ditched "in" completely; simplex should be stateless
|
//TODO would be nice if these functions used the seed and ditched "in" completely; simplex should be stateless
|
||||||
|
|
||||||
protected float noise(GenerateInput in, float scl, float mag){
|
protected float noise(GenerateInput in, float scl, float mag){
|
||||||
return (float)Simplex.noise2d(seed, 1f, 0f, 1f / scl, in.x, in.y) * mag;
|
return Simplex.noise2d(seed, 1f, 0f, 1f / scl, in.x, in.y) * mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float noise(GenerateInput in, float scl, float mag, float octaves, float persistence){
|
protected float noise(GenerateInput in, float scl, float mag, float octaves, float persistence){
|
||||||
return (float)Simplex.noise2d(seed, octaves, persistence, 1f / scl, in.x, in.y) * mag;
|
return Simplex.noise2d(seed, octaves, persistence, 1f / scl, in.x, in.y) * mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float rnoise(float x, float y, float scl, float mag){
|
protected float rnoise(float x, float y, float scl, float mag){
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
|
|||||||
@Override
|
@Override
|
||||||
protected float noise(float x, float y, double octaves, double falloff, double scl, double mag){
|
protected float noise(float x, float y, double octaves, double falloff, double scl, double mag){
|
||||||
Vec3 v = sector.rect.project(x, y);
|
Vec3 v = sector.rect.project(x, y);
|
||||||
return (float)Simplex.noise3d(0, octaves, falloff, 1f / scl, v.x, v.y, v.z) * (float)mag;
|
return Simplex.noise3d(0, octaves, falloff, 1f / scl, v.x, v.y, v.z) * (float)mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return the scaling factor for sector rects. */
|
/** @return the scaling factor for sector rects. */
|
||||||
|
|||||||
Reference in New Issue
Block a user