mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-05 09:39:32 -08:00
Simplify Target (C#) folder strucure
This commit is contained in:
21
86_Target/csharp/Offset.cs
Normal file
21
86_Target/csharp/Offset.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace Target
|
||||
{
|
||||
internal class Offset
|
||||
{
|
||||
public Offset(float deltaX, float deltaY, float deltaZ)
|
||||
{
|
||||
DeltaX = deltaX;
|
||||
DeltaY = deltaY;
|
||||
DeltaZ = deltaZ;
|
||||
|
||||
Distance = (float)Math.Sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ + deltaZ);
|
||||
}
|
||||
|
||||
public float DeltaX { get; }
|
||||
public float DeltaY { get; }
|
||||
public float DeltaZ { get; }
|
||||
public float Distance { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user