Downgraded to C# 9

This commit is contained in:
Pascal Serrarens 2025-02-19 11:21:12 +01:00
parent 4044b86a9d
commit 0a75c7f4fd
3 changed files with 8 additions and 12 deletions

View File

@ -3,8 +3,7 @@
<PropertyGroup> <PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@ -1,5 +1,6 @@
#if !UNITY_5_3_OR_NEWER #if !UNITY_5_3_OR_NEWER
using System;
namespace Passer.LinearAlgebra { namespace Passer.LinearAlgebra {
public class Vector3Of<T> { public class Vector3Of<T> {
public T x; public T x;
@ -17,9 +18,11 @@ namespace Passer.LinearAlgebra {
// } // }
} }
public class Vector3Int(int x, int y, int z) : Vector3Of<int>(x, y, z) { public class Vector3Int : Vector3Of<int> {
public Vector3Int(int x, int y, int z) : base(x, y, z) { }
} }
public class Vector3Float(float x, float y, float z) : Vector3Of<float>(x, y, z) { public class Vector3Float : Vector3Of<float> {
public Vector3Float(float x, float y, float z) : base(x, y, z) { }
public float magnitude { public float magnitude {
get => (float)Math.Sqrt(this.x * this.x + this.y * this.y + this.z * this.z); get => (float)Math.Sqrt(this.x * this.x + this.y * this.y + this.z * this.z);

View File

@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
@ -17,10 +15,6 @@
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" /> <PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Using Include="NUnit.Framework" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\ControlCore.csproj" /> <ProjectReference Include="..\ControlCore.csproj" />
</ItemGroup> </ItemGroup>