Skip to content

Commit

Permalink
Update Static.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Fexcraft committed Nov 6, 2020
1 parent 9ea4c5f commit 3801550
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/net/fexcraft/lib/mc/utils/Static.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,12 @@ public static InputStream getResource(String str){
}
}

public static double clamp(double val, double min, double max){
return val < min ? min : val > max ? max : val;
}

public static float clamp(float val, float min, float max){
return val < min ? min : val > max ? max : val;
}

}

0 comments on commit 3801550

Please sign in to comment.