Lerp 1.0.3

.NET Framework 4.5.2
dotnet add package Lerp --version 1.0.3
NuGet\Install-Package Lerp -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lerp" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Lerp --version 1.0.3
#r "nuget: Lerp, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Lerp as a Cake Addin
#addin nuget:?package=Lerp&version=1.0.3

// Install Lerp as a Cake Tool
#tool nuget:?package=Lerp&version=1.0.3

Description:

Defines Lerp and Map2 typeclasses in FSharpPlus style. Implement generic lerp function. Also allows generic map2 function that can be used to implement generic lerp on containers.

Examples:

    type Map2 with
        static member Map2 ((f, xs, ys), _mthd: Map2) = List.map2 f xs ys
        static member Map2 ((f, xo, yo), _mthd: Map2) = Option.map2 f xo yo
    
    type Lerp with 
        static member Lerp ((dt: float', v: float', f: float'), _mthd: Lerp) = float'.lerp v f dt
        static member Lerp ((dt: float32, v: float32, f: float32), _mthd: Lerp) = (1.f - dt) * v + dt * f
        static member Lerp ((dt: float', v: Vec, f: Vec), _mthd: Lerp) = Vec.lerp v f dt
        static member inline Lerp ((dt: float', v:'``Container<^v>``, f:'``Container<^f>``), _mthd: Lerp) = map2 (fun v f -> lerp dt v f) v f
        
    let map2o : int option = map2 (fun a b -> a + b) (Some 3) (None)        
    let lerpf = lerp 0.1f 0.0f 1.0f
    let lerpv = lerp (fract 1 60) Vec.Zero Vec.one
    let lerpov : Option<Vec> = lerp (fract 1 60) (Some Vec.Zero) (Some Vec.one)
    let lerplv : List<Vec> = lerp (fract 1 60) [Vec.Zero] [Vec.one]
    let lerpolv : List<Option<Vec>> = lerp (fract 1 60) [Some Vec.Zero] [Some Vec.one]
Product Versions
.NET Framework net452 net46 net461 net462 net463 net47 net471 net472 net48 net481
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 392 7/24/2020
1.0.2 383 7/24/2020
1.0.1 382 7/24/2020