![]() |
VOOZH | about |
dotnet add package Lerp --version 1.0.3
NuGet\Install-Package Lerp -Version 1.0.3
<PackageReference Include="Lerp" Version="1.0.3" />
<PackageVersion Include="Lerp" Version="1.0.3" />Directory.Packages.props
<PackageReference Include="Lerp" />Project file
paket add Lerp --version 1.0.3
#r "nuget: Lerp, 1.0.3"
#:package Lerp@1.0.3
#addin nuget:?package=Lerp&version=1.0.3Install as a Cake Addin
#tool nuget:?package=Lerp&version=1.0.3Install as a Cake Tool
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.
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 Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net452 net452 is compatible. net46 net46 was computed. net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.0.3 | 874 | 7/24/2020 | 1.0.3 is deprecated because it is no longer maintained and has critical bugs. |
| 1.0.2 | 809 | 7/24/2020 | 1.0.2 is deprecated because it is no longer maintained and has critical bugs. |
| 1.0.1 | 802 | 7/24/2020 | 1.0.1 is deprecated because it is no longer maintained and has critical bugs. |