public bool Overlaps(BiomeSurfaceSwitch b2) { bool slopeOverlaps = (!slopeEnabled || !b2.slopeEnabled) || (slopeEnabled && b2.slopeEnabled && Utils.Overlap(minSlope, maxSlope, b2.minSlope, b2.maxSlope)); bool heightOverlaps = (!heightEnabled || !b2.heightEnabled) || (heightEnabled && b2.heightEnabled && Utils.Overlap(minHeight, maxHeight, b2.minHeight, b2.maxHeight)); bool paramOverlaps = (!paramEnabled || !b2.paramEnabled) || (paramEnabled && b2.paramEnabled && Utils.Overlap(minParam, maxParam, b2.minParam, b2.maxParam)); return(slopeOverlaps && heightOverlaps && paramOverlaps); }
public float GapWidth(BiomeSurfaceSwitch b2) { float gap = 0; if (heightEnabled) { gap += Utils.GapWidth(minHeight, maxHeight, b2.minHeight, b2.maxHeight); } if (slopeEnabled) { gap += Utils.GapWidth(minSlope, maxSlope, b2.minSlope, b2.maxSlope); } if (paramEnabled) { gap += Utils.GapWidth(minParam, maxParam, b2.minParam, b2.maxParam); } return(gap); }