Skip to content

Commit

Permalink
馃
Browse files Browse the repository at this point in the history
  • Loading branch information
nenoNaninu committed Oct 19, 2020
1 parent 04eaba1 commit 0bd2500
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions HomographySharp/Double/HomographyDoubleMatrix.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;

namespace HomographySharp.Double
Expand All @@ -13,6 +14,8 @@ internal HomographyDoubleMatrix(double[] elements)

public override IReadOnlyList<double> Elements => _elements;

public override ReadOnlySpan<double> ElementsAsSpan() => _elements;

public override Point2<double> Translate(double srcX, double srcY)
{
var dst1 = _elements[0] * srcX + _elements[1] * srcY + _elements[2];
Expand Down
3 changes: 2 additions & 1 deletion HomographySharp/HomographySharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;</TargetFrameworks>
<PackageId>HomographySharp</PackageId>
<AssemblyName>HomographySharp</AssemblyName>
<Version>1.5.0</Version>
<Version>2.0.0</Version>
<Authors>nenoNaninu</Authors>
<RepositoryUrl>https://github.com/nenoNaninu/HomographySharp</RepositoryUrl>
<Title>HomographySharp</Title>
Expand All @@ -18,6 +18,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Memory" Version="4.5.*" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.*" />
</ItemGroup>

Expand Down
2 changes: 2 additions & 0 deletions HomographySharp/Matrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public abstract class HomographyMatrix<T> where T : struct, IEquatable<T>

public abstract IReadOnlyList<T> Elements { get; }

public abstract ReadOnlySpan<T> ElementsAsSpan();

internal HomographyMatrix()
{
}
Expand Down
3 changes: 3 additions & 0 deletions HomographySharp/Single/HomographySingleMatrix.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;

namespace HomographySharp.Single
Expand All @@ -13,6 +14,8 @@ internal HomographySingleMatrix(float[] elements)

public override IReadOnlyList<float> Elements => _elements;

public override ReadOnlySpan<float> ElementsAsSpan() => _elements;

public override Point2<float> Translate(float srcX, float srcY)
{
var dst1 = _elements[0] * srcX + _elements[1] * srcY + _elements[2];
Expand Down

0 comments on commit 0bd2500

Please sign in to comment.