// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.server.worldgen.util.bounds;

import javax.annotation.Nonnull;
import java.util.Random;
import com.hypixel.hytale.math.util.ChunkUtil;

public interface IWorldBounds extends IChunkBounds
{
    int getLowBoundY();
    
    int getHighBoundY();
    
    default boolean intersectsChunk(final long chunkIndex) {
        return this.intersectsChunk(ChunkUtil.xOfChunkIndex(chunkIndex), ChunkUtil.zOfChunkIndex(chunkIndex));
    }
    
    default int randomY(@Nonnull final Random random) {
        return random.nextInt(this.getHighBoundY() - this.getLowBoundY()) + this.getLowBoundY();
    }
    
    default double fractionY(final double d) {
        return (this.getHighBoundY() - this.getLowBoundY()) * d + this.getLowBoundY();
    }
}
