mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 07:29:02 -08:00
Spaces tend to cause annoyances in a Unix-style shell environment. This change fixes that.
22 lines
491 B
C#
22 lines
491 B
C#
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; }
|
|
}
|
|
}
|