mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-28 19:39:17 +00:00
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Taiyou06 <kaandindar21@gmail.com>
|
|
Date: Thu, 7 Nov 2024 23:51:51 +0100
|
|
Subject: [PATCH] Lithium: CompactSineLUT
|
|
|
|
This patch is based on the following mixin:
|
|
"net/caffeinemc/mods/lithium/mixin/math/sine_lut/MthMixin.java"
|
|
By: 2No2Name <2No2Name@web.de>
|
|
As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
|
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
|
|
|
diff --git a/net/minecraft/util/Mth.java b/net/minecraft/util/Mth.java
|
|
index 1b60fa34e4d6a5c00a983bf94e4d16d1eb46c665..1e93f74dece88509e56f077d07f67184335801b1 100644
|
|
--- a/net/minecraft/util/Mth.java
|
|
+++ b/net/minecraft/util/Mth.java
|
|
@@ -46,11 +46,11 @@ public class Mth {
|
|
private static final double[] COS_TAB = new double[257];
|
|
|
|
public static float sin(float value) {
|
|
- return SIN[(int)(value * 10430.378F) & 65535];
|
|
+ return org.dreeam.leaf.util.math.CompactSineLUT.sin(value); // Leaf - Lithium - CompactSineLUT
|
|
}
|
|
|
|
public static float cos(float value) {
|
|
- return SIN[(int)(value * 10430.378F + 16384.0F) & 65535];
|
|
+ return org.dreeam.leaf.util.math.CompactSineLUT.cos(value); // Leaf - Lithium - CompactSineLUT
|
|
}
|
|
|
|
public static float sqrt(float value) {
|