Volume Control
Application-specific hotkeys for Windows
VolumeControl.TypeExtensions.Int32Extensions Class Reference

Extensions for the int integral type. More...

Collaboration diagram for VolumeControl.TypeExtensions.Int32Extensions:

Static Public Member Functions

static int Scale (this int input, int inRangeMin, int inRangeMax, int outRangeMin, int outRangeMax)
 
static int Scale (this int input,(int, int) inRange,(int, int) outRange)
 Accepts input , a number in the range ( inRange .Item1 - inRange .Item2 ), and translates it to be within the range ( outRange .Item1 - outRange .Item2 ). More...
 

Detailed Description

Extensions for the int integral type.

Member Function Documentation

◆ Scale()

static int VolumeControl.TypeExtensions.Int32Extensions.Scale ( this int  input,
(int, int)  inRange,
(int, int)  outRange 
)
static

Accepts input , a number in the range ( inRange .Item1 - inRange .Item2 ), and translates it to be within the range ( outRange .Item1 - outRange .Item2 ).

See Scale(int, int, int, int, int) if you're having trouble with the tuples.

Parameters
inputThe input number
inRangeThe range that input is within.
outRangeThe range to translate input to.
Returns
input scaled to be within the range outRange .Item1 - outRange .Item2

The documentation for this class was generated from the following file: