mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 14:33:57 +01:00
rename the confounding function
This commit is contained in:
parent
398a848791
commit
9df796029f
@ -3,7 +3,7 @@ package com.simibubi.create.foundation.render;
|
||||
public class RenderMath {
|
||||
public static final float SQRT2 = 1.41421356237f;
|
||||
|
||||
public static int timesSqrt2(int i) {
|
||||
public static int rotateSideLength(int i) {
|
||||
return (int) Math.floor((float) i * SQRT2 / 4f);
|
||||
}
|
||||
|
||||
|
@ -3,14 +3,11 @@ package com.simibubi.create.foundation.render.light;
|
||||
import com.simibubi.create.foundation.render.RenderMath;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.SectionPos;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import net.minecraft.world.LightType;
|
||||
|
||||
import java.util.function.IntFunction;
|
||||
|
||||
import static com.simibubi.create.foundation.render.RenderMath.isPowerOf2;
|
||||
import static com.simibubi.create.foundation.render.RenderMath.rotateSideLength;
|
||||
|
||||
public class GridAlignedBB {
|
||||
public int minX;
|
||||
@ -94,11 +91,11 @@ public class GridAlignedBB {
|
||||
|
||||
public void rotate45(Direction.Axis axis) {
|
||||
if (axis == Direction.Axis.X) {
|
||||
this.grow(0, RenderMath.timesSqrt2(sizeY()), RenderMath.timesSqrt2(sizeZ()));
|
||||
this.grow(0, rotateSideLength(sizeY()), rotateSideLength(sizeZ()));
|
||||
} else if (axis == Direction.Axis.Y) {
|
||||
this.grow(RenderMath.timesSqrt2(sizeX()), 0, RenderMath.timesSqrt2(sizeZ()));
|
||||
this.grow(rotateSideLength(sizeX()), 0, rotateSideLength(sizeZ()));
|
||||
} else if (axis == Direction.Axis.Z) {
|
||||
this.grow(RenderMath.timesSqrt2(sizeX()), RenderMath.timesSqrt2(sizeY()), 0);
|
||||
this.grow(rotateSideLength(sizeX()), rotateSideLength(sizeY()), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user