Class VectorUtils

java.lang.Object
codechicken.lib.util.VectorUtils

public class VectorUtils extends Object
Created by covers1624 on 4/10/2016.
  • Constructor Details

    • VectorUtils

      public VectorUtils()
  • Method Details

    • calculateNormal

      public static Vector3 calculateNormal(Vector3... vertices)
      Calculates a normal for the given vertices.
      Parameters:
      vertices - The vertices to calculate a normal for, Expected to be a length of 3.
      Returns:
      The normal.
    • findSide

      public static int findSide(Vector3 normal)
      Calculates the int direction a normal is facing.
      Parameters:
      normal - The normal to calculate from.
      Returns:
      The direction the normal is facing.
    • findSideE

      @Nullable public static @Nullable net.minecraft.core.Direction findSideE(Vector3 normal)
      Calculates the EnumFacing for a given normal.
      Parameters:
      normal - The normal to calculate from.
      Returns:
      The direction the normal is facing.