Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

remap float c#

public static class ExtensionMethods {
 
	public static float Remap (this float value, float from1, float to1, float from2, float to2) {
    	return (value - from1) / (to1 - from1) * (to2 - from2) + from2;
	}
   
}
Source by forum.unity.com #
 
PREVIOUS NEXT
Tagged: #remap #float
ADD COMMENT
Topic
Name
8+3 =