Photomechanics API
Photomechanics.Photo3DStudio.Common.Extensions.MathExtensions Class Reference

Extensions for Math. More...

Static Public Member Functions

static Double Lerp (Double a, Double b, Double t)
 Linear interpolation between a and b with factor t. More...
 
static Int32 LerpRounded (Int32 a, Int32 b, Double t, MidpointRounding rounding=MidpointRounding.ToEven)
 Linear interpolation between integers a and b with factor t with given rounding method. More...
 
static Int64 LerpRounded (Int64 a, Int64 b, Double t, MidpointRounding rounding=MidpointRounding.ToEven)
 Linear interpolation between integers a and b with factor t with given rounding method. More...
 

Detailed Description

Extensions for Math.

Member Function Documentation

◆ Lerp()

static Double Photomechanics.Photo3DStudio.Common.Extensions.MathExtensions.Lerp ( Double  a,
Double  b,
Double  t 
)
static

Linear interpolation between a and b with factor t.

◆ LerpRounded() [1/2]

static Int32 Photomechanics.Photo3DStudio.Common.Extensions.MathExtensions.LerpRounded ( Int32  a,
Int32  b,
Double  t,
MidpointRounding  rounding = MidpointRounding.ToEven 
)
static

Linear interpolation between integers a and b with factor t with given rounding method.

◆ LerpRounded() [2/2]

static Int64 Photomechanics.Photo3DStudio.Common.Extensions.MathExtensions.LerpRounded ( Int64  a,
Int64  b,
Double  t,
MidpointRounding  rounding = MidpointRounding.ToEven 
)
static

Linear interpolation between integers a and b with factor t with given rounding method.