Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Latest commit

 

History

History
22 lines (17 loc) · 771 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 771 Bytes

MoonTools.Core.Curve

NuGet Badge CircleCI

Implements quadratic and cubic Bezier curves in 2D and 3D.

Example

    var myCurve = new CubicBezierCurve3D(
        new Vector3(-4, -4, -3),
        new Vector3(-2, 4, 0),
        new Vector3(2, -4, 3),
        new Vector3(4, 4, 0)
    );

    myCurve.Point(0.5f); // => Vector3(0, 0, 0.75f)
    myCurve.Point(3, 2, 4); // => Vector3(0, 0, 0.75f);
    myCurve.Velocity(0.5f); // => Vector3(9, 0, 4.5f)
    myCurve.Velocity(3, 2, 4); // => Vector3(9, 0, 4.5f);