Browse Source

remove Core namespace

master
Evan Hemsley 1 year ago
parent
commit
55585138da
15 changed files with 36 additions and 37 deletions
  1. +1
    -1
      .circleci/config.yml
  2. +2
    -2
      Curve/ArgumentChecker.cs
  3. +3
    -3
      Curve/CubicBezierCurve2D.cs
  4. +2
    -2
      Curve/CubicBezierCurve3D.cs
  5. +6
    -6
      Curve/Curve.csproj
  6. +2
    -2
      Curve/Extensions.cs
  7. +3
    -3
      Curve/QuadraticBezierCurve2D.cs
  8. +2
    -2
      Curve/QuadraticBezierCurve3D.cs
  9. +2
    -2
      Curve/TimeHelper.cs
  10. +4
    -4
      README.md
  11. +2
    -2
      Test/CubicBezierCurve2D.cs
  12. +2
    -2
      Test/CubicBezierCurve3D.cs
  13. +2
    -2
      Test/QuadraticBezierCurve2D.cs
  14. +2
    -2
      Test/QuadraticBezierCurve3D.cs
  15. +1
    -2
      Test/Test.csproj

+ 1
- 1
.circleci/config.yml View File

@ -26,7 +26,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: dotnet nuget push ./Curve/bin/Release/MoonTools.Core.Curve.*.nupkg -k $API_KEY -s https://api.nuget.org/v3/index.json
- run: dotnet nuget push ./Curve/bin/Release/MoonTools.Curve.*.nupkg -k $API_KEY -s https://api.nuget.org/v3/index.json
workflows:
version: 2


+ 2
- 2
Curve/ArgumentChecker.cs View File

@ -1,4 +1,4 @@
namespace MoonTools.Core.Curve
namespace MoonTools.Curve
{
public static class ArgumentChecker
{
@ -10,4 +10,4 @@ namespace MoonTools.Core.Curve
}
}
}
}
}

+ 3
- 3
Curve/CubicBezierCurve2D.cs View File

@ -1,8 +1,8 @@
using System;
using System.Numerics;
using MoonTools.Core.Curve.Extensions;
using MoonTools.Curve.Extensions;
namespace MoonTools.Core.Curve
namespace MoonTools.Curve
{
/// <summary>
/// A 2-dimensional Bezier curve defined by 4 points.
@ -168,4 +168,4 @@ namespace MoonTools.Core.Curve
return !(left == right);
}
}
}
}

+ 2
- 2
Curve/CubicBezierCurve3D.cs View File

@ -1,7 +1,7 @@
using System;
using System.Numerics;
namespace MoonTools.Core.Curve
namespace MoonTools.Curve
{
/// <summary>
/// A 3-dimensional Bezier curve defined by 4 points.
@ -166,4 +166,4 @@ namespace MoonTools.Core.Curve
return !(left == right);
}
}
}
}

+ 6
- 6
Curve/Curve.csproj View File

@ -2,17 +2,17 @@
<PropertyGroup>
<Version>2.1.0</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>A Bezier curve library for .NET Core</Description>
<PackageId>MoonTools.Core.Curve</PackageId>
<RootNamespace>MoonTools.Core.Curve</RootNamespace>
<Description>A Bezier curve library for .NET Standard</Description>
<PackageId>MoonTools.Curve</PackageId>
<RootNamespace>MoonTools.Curve</RootNamespace>
<Company>Moonside Games</Company>
<Authors>Evan Hemsley</Authors>
<Copyright>Evan Hemsley 2019</Copyright>
<Product>MoonTools.Core.Curve</Product>
<Product>MoonTools.Curve</Product>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyName>MoonTools.Core.Curve</AssemblyName>
<AssemblyName>MoonTools.Curve</AssemblyName>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/MoonsideGames/MoonTools.Core.Curve</PackageProjectUrl>
<PackageProjectUrl>https://gitea.moonside.games/MoonsideGames/MoonTools.Curve</PackageProjectUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">


+ 2
- 2
Curve/Extensions.cs View File

@ -1,9 +1,9 @@
using System.Numerics;
namespace MoonTools.Core.Curve.Extensions
namespace MoonTools.Curve.Extensions
{
public static class Vector2Extensions
{
public static Vector2 XY(this Vector3 vector) => new Vector2(vector.X, vector.Y);
}
}
}

+ 3
- 3
Curve/QuadraticBezierCurve2D.cs View File

@ -1,8 +1,8 @@
using MoonTools.Core.Curve.Extensions;
using MoonTools.Curve.Extensions;
using System;
using System.Numerics;
namespace MoonTools.Core.Curve
namespace MoonTools.Curve
{
/// <summary>
/// A 2-dimensional Bezier curve defined by 3 points.
@ -176,4 +176,4 @@ namespace MoonTools.Core.Curve
return !(left == right);
}
}
}
}

+ 2
- 2
Curve/QuadraticBezierCurve3D.cs View File

@ -1,7 +1,7 @@
using System;
using System.Numerics;
namespace MoonTools.Core.Curve
namespace MoonTools.Curve
{
/// <summary>
/// A 3-dimensional Bezier curve defined by 3 points.
@ -170,4 +170,4 @@ namespace MoonTools.Core.Curve
return !(left == right);
}
}
}
}

+ 2
- 2
Curve/TimeHelper.cs View File

@ -1,7 +1,7 @@
namespace MoonTools.Core.Curve
namespace MoonTools.Curve
{
public static class TimeHelper
{
public static float Normalized(float t, float minT, float maxT) => (t - minT) / (maxT - minT);
}
}
}

+ 4
- 4
README.md View File

@ -1,7 +1,7 @@
# MoonTools.Core.Curve
# MoonTools.Curve
[![NuGet Badge](https://buildstats.info/nuget/MoonTools.Core.Curve)](https://www.nuget.org/packages/MoonTools.Core.Curve/)
[![CircleCI](https://circleci.com/gh/MoonsideGames/MoonTools.Core.Curve.svg?style=svg)](https://circleci.com/gh/MoonsideGames/MoonTools.Core.Curve)
[![NuGet Badge](https://buildstats.info/nuget/MoonTools.Curve)](https://www.nuget.org/packages/MoonTools.Curve/)
[![CircleCI](https://circleci.com/gh/MoonsideGames/MoonTools.Curve.svg?style=svg)](https://circleci.com/gh/MoonsideGames/MoonTools.Curve)
Implements quadratic and cubic Bezier curves in 2D and 3D.
@ -19,4 +19,4 @@ Implements quadratic and cubic Bezier curves in 2D and 3D.
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);
```
```

+ 2
- 2
Test/CubicBezierCurve2D.cs View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Curve;
using MoonTools.Curve;
using System;
using System.Numerics;
@ -185,4 +185,4 @@ namespace Tests
(myCurve != otherCurve).Should().BeTrue();
}
}
}
}

+ 2
- 2
Test/CubicBezierCurve3D.cs View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Curve;
using MoonTools.Curve;
using System;
using System.Numerics;
@ -193,4 +193,4 @@ namespace Tests
(myCurve != otherCurve).Should().BeTrue();
}
}
}
}

+ 2
- 2
Test/QuadraticBezierCurve2D.cs View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Curve;
using MoonTools.Curve;
using System;
using System.Numerics;
@ -180,4 +180,4 @@ namespace Tests
(myCurve != otherCurve).Should().BeTrue();
}
}
}
}

+ 2
- 2
Test/QuadraticBezierCurve3D.cs View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Curve;
using MoonTools.Curve;
using System;
using System.Numerics;
@ -178,4 +178,4 @@ namespace Tests
(myCurve != otherCurve).Should().BeTrue();
}
}
}
}

+ 1
- 2
Test/Test.csproj View File

@ -4,7 +4,6 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL.Core" Version="3.7.0.7"/>
<PackageReference Include="nunit" Version="3.12.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0"/>
@ -13,4 +12,4 @@
<ItemGroup>
<ProjectReference Include="..\Curve\Curve.csproj"/>
</ItemGroup>
</Project>
</Project>

Loading…
Cancel
Save