Skip to content

Commit 24ec3a8

Browse files
MathF class
1 parent 369f63b commit 24ec3a8

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/main/java/multiteam/multicore_lib/MultiCoreLib.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ private void doClientStuff(final FMLClientSetupEvent event) {
3939
}
4040

4141
private void enqueueIMC(final InterModEnqueueEvent event) {
42-
4342
}
4443

4544
private void processIMC(final InterModProcessEvent event) {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package multiteam.multicore_lib.setup.utilities;
2+
3+
public class MathF { //Why MathF? Because in unity, there was a class with Mathematical functions, and i grown quiet fond of this name. In the honor of my C# past, you shall now be named MathF!
4+
5+
public float rescaleValues(float minFrom, float maxFrom, float minTo, float maxTo, float valueToScale){
6+
float OldRange = (maxFrom - minFrom);
7+
float NewRange = (maxTo - minTo);
8+
9+
return (((valueToScale - minFrom) * NewRange) / OldRange) + minTo;
10+
}
11+
12+
}

0 commit comments

Comments
 (0)