Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

scale between tow ranges c#

public float scale(float OldMin, float OldMax, float NewMin, float NewMax, float OldValue){
 
    float OldRange = (OldMax - OldMin);
    float NewRange = (NewMax - NewMin);
    float NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin;
 
    return(NewValue);
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity guid to object 
Csharp :: dataannotations datetime range 
Csharp :: .net 6 autofac 
Csharp :: sorting list by date time dec in c# 
Csharp :: c# read double 
Csharp :: c# loop through repeater items 
Csharp :: Search for a value into a list in c# 
Csharp :: how read excel data in c# 
Csharp :: c# Dictionary contains key case insensitive 
Csharp :: c# make file not read only 
Csharp :: C# Bitwise Right Shift 
Csharp :: LINQ: 2 join with group by 
Csharp :: why is called c# 
Csharp :: Oculus Unity button press 
Csharp :: c# remove time in datetime 
Csharp :: Scrollable WPF ListBox 
Csharp :: string c# 
Csharp :: how to convert timestamp to datetime c# 
Csharp :: get file name from stream c# 
Csharp :: timer unity 
Csharp :: c# fileupload example 
Csharp :: c# float 
Csharp :: csharp Console.Read(); 
Csharp :: substring in c# 
Csharp :: Match one of 1, 2, x or X, or nothing 
Csharp :: c# listview filter contains 
Csharp :: unity DOScale 
Csharp :: change color unity over time 
Csharp :: how to fill model enum with bradio button asp razor 
Csharp :: unity mouse button names 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =