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

package com.hypixel.hytale.procedurallib.property;

import javax.annotation.Nonnull;
import com.hypixel.hytale.procedurallib.random.CoordinateRotator;

public class RotateNoiseProperty implements NoiseProperty
{
    protected final NoiseProperty noise;
    protected final CoordinateRotator rotation;
    
    public RotateNoiseProperty(final NoiseProperty noise, final CoordinateRotator rotation) {
        this.noise = noise;
        this.rotation = rotation;
    }
    
    @Override
    public double get(final int seed, final double x, final double y) {
        final double px = this.rotation.rotateX(x, y);
        final double py = this.rotation.rotateY(x, y);
        return this.noise.get(seed, px, py);
    }
    
    @Override
    public double get(final int seed, final double x, final double y, final double z) {
        final double px = this.rotation.rotateX(x, y, z);
        final double py = this.rotation.rotateY(x, y, z);
        final double pz = this.rotation.rotateZ(x, y, z);
        return this.noise.get(seed, px, py, pz);
    }
    
    @Nonnull
    @Override
    public String toString() {
        return "RotateNoiseProperty{noise=" + String.valueOf(this.noise) + ", rotation=" + String.valueOf(this.rotation);
    }
}
