move imgui property code and Pysics Actor code to a single file
This commit is contained in:
@ -7,4 +7,14 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="bin\Debug\net9.0\Prism-ScriptCore.deps.json" />
|
||||
<Content Include="bin\Debug\net9.0\Prism-ScriptCore.dll" />
|
||||
<Content Include="bin\Debug\net9.0\Prism-ScriptCore.pdb" />
|
||||
<Content Include="bin\Release\net9.0\Prism-ScriptCore.deps.json" />
|
||||
<Content Include="bin\Release\net9.0\Prism-ScriptCore.dll" />
|
||||
<Content Include="bin\Release\net9.0\Prism-ScriptCore.pdb" />
|
||||
<Content Include="Prism-ScriptCore.sln" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.1.11312.151 d18.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prism-ScriptCore", "Prism-ScriptCore.csproj", "{B94EF710-0487-4388-97E3-B650761A849C}"
|
||||
EndProject
|
||||
Global
|
||||
@ -13,4 +16,10 @@ Global
|
||||
{B94EF710-0487-4388-97E3-B650761A849C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B94EF710-0487-4388-97E3-B650761A849C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {BA69725C-3CFE-4882-9EDF-2A8E92423E8F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@ -29,6 +29,29 @@ namespace Prism
|
||||
Y = Mathf.Clamp(Y, min.Y, max.Y);
|
||||
}
|
||||
|
||||
public float LengthSquared()
|
||||
{
|
||||
return X * X + Y * Y;
|
||||
}
|
||||
|
||||
public float Length()
|
||||
{
|
||||
return (float)Math.Sqrt(X * X + Y * Y);
|
||||
}
|
||||
|
||||
public Vec2 Normalized()
|
||||
{
|
||||
float length = Length();
|
||||
return new Vec2(X / length, Y / length);
|
||||
}
|
||||
|
||||
public void Normalize()
|
||||
{
|
||||
float length = Length();
|
||||
X = X / length;
|
||||
Y = Y / length;
|
||||
}
|
||||
|
||||
public static Vec2 operator -(Vec2 l, Vec2 r)
|
||||
{
|
||||
return new Vec2(l.X - r.X, l.Y - r.Y);
|
||||
|
||||
@ -60,6 +60,11 @@ namespace Prism
|
||||
Z = Mathf.Clamp(Z, min.Z, max.Z);
|
||||
}
|
||||
|
||||
public float LengthSquared()
|
||||
{
|
||||
return X * X + Y * Y + Z * Z;
|
||||
}
|
||||
|
||||
public float Length()
|
||||
{
|
||||
return (float)Math.Sqrt(X * X + Y * Y + Z * Z);
|
||||
|
||||
Reference in New Issue
Block a user