This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import jdk.incubator.vector.VectorShape; | |
| import jdk.incubator.vector.VectorSpecies; | |
| private static <T> VectorSpecies<T> findSpecies(Class<?> type, int amount) { | |
| int bitsize = VectorSpecies.elementSize(type) * amount; | |
| VectorShape vectorShape = VectorShape.forBitSize(bitsize); | |
| return (VectorSpecies<T>) VectorSpecies.of(type, vectorShape); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.function.Supplier; | |
| @FunctionalInterface | |
| interface Lazy<T> extends Supplier<T> { | |
| T get(); | |
| static <T> Lazy<T> of(Supplier<T> supplier) { | |
| return new LazyImpl<>(supplier); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.joml.Quaternionf; | |
| import org.joml.Vector3f; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Vector3f display = new Vector3f(0,10,0); | |
| Vector3f center = new Vector3f(0,0,0); | |
| float angle = 90f; | |
| Vector3f axis = new Vector3f(1,0,0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Tag, Build, and Release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'pom.xml' | |
| - 'src/**' | |
| pull_request: | |
| paths: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public sealed interface Result<T> permits Result.Success, Result.Failure { | |
| record Success<T>(T value) implements Result<T> {} | |
| final class Failure<T> implements Result<T> {} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Allows for packing coordinates ranging from -67_108_864 to 67_108_863 | |
| // on X and Z axis, and -64 to 320 on Y axis into one compact long | |
| enum XYZ { | |
| X, | |
| Y, | |
| Z; | |
| public static long pack(int x, int y, int z) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package divo.felix.chem.pte; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| /** | |
| * Holds information of the periodic table of elements. | |
| * | |
| * @author Felix Divo | |
| */ |