public class Dimension { public int X; public int Y; public int Z; public Dimension(int x, int y, int z) { X = x; Y = y; Z = z; } #region Operators public static Dimension operator +(Dimension dimensionA, Dimension dimensionB) { return new Dimension(dimensionA.X + dimensionB.X, dimensionA.Y + dimensionB.Y, dimensionA.Z + dimensionB.Z); } public static Dimension operator -(Dimension dimensionA, Dimension dimensionB) { return new Dimension(dimensionA.X - dimensionB.X, dimensionA.Y - dimensionB.Y, dimensionA.Z - dimensionB.Z); } public static Dimension operator *(Dimension dimensionA, Dimension dimensionB) { return new Dimension(dimensionA.X * dimensionB.X, dimensionA.Y * dimensionB.Y, dimensionA.Z * dimensionB.Z); } public static Dimension operator /(Dimension dimensionA, Dimension dimensionB) { return new Dimension(dimensionA.X / dimensionB.X, dimensionA.Y / dimensionB.Y, dimensionA.Z / dimensionB.Z); } #endregion }
A ready-to-go Dimension class, so you can specify a 3D point and add, substract, divide or multiply them.
fur_Latn eng_Latn