29 lines
538 B
C#
29 lines
538 B
C#
namespace VRC_Console;
|
|
|
|
public class Vector
|
|
{
|
|
public double X { get; set; }
|
|
public double Y { get; set; }
|
|
|
|
public Vector()
|
|
{
|
|
this.X = 0;
|
|
this.Y = 0;
|
|
}
|
|
|
|
public Vector(double x, double y)
|
|
{
|
|
this.X = x;
|
|
this.Y = y;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"({this.X:' '0.00000;'-'0.00000} {this.Y:' '0.00000;'-'0.00000})";
|
|
}
|
|
|
|
public Vector MultipliedWith(double factor)
|
|
{
|
|
return new Vector(this.X * factor, this.Y * factor);
|
|
}
|
|
} |