Beispiel #1
0
 /// <summary>
 /// Builds a 2D Vector From it's Magnitude and the angle it makes with i
 /// </summary>
 /// <param name="KnownMagnitude">The Magnitude of the vector</param>
 /// <param name="AngleWithi">The Angle the vector makes with i</param>
 internal Vector(long KnownMagnitude = 0, double AngleWithi = 0)
 {
     Magnitude           = KnownMagnitude;
     AngleUnit           = Settings.AngleUnitInstance;
     iComponent          = (float)(KnownMagnitude * Math.Cos(AngleUnit.ToRadians(AngleWithi))); //cos for x or i
     jComponent          = (float)(KnownMagnitude * Math.Sin(AngleUnit.ToRadians(AngleWithi))); //sin for y or j
     Direction           = new UnitVector(Magnitude, iComponent, jComponent);
     AngleWithiComponent = AngleWithi;
 }
Beispiel #2
0
 /// <summary>
 /// Builds a 2D vector From it's i and j Componets
 /// </summary>
 /// <param name="iVal">The i Value of the Vector</param>
 /// <param name="jVal">The j Value of the Vector</param>
 internal Vector(float iVal = 0, float jVal = 0)
 {
     iComponent          = iVal;
     jComponent          = jVal;
     AngleUnit           = Settings.AngleUnitInstance;
     Magnitude           = CalculateMagnitude(iComponent, jComponent);
     Direction           = new UnitVector(Magnitude, iComponent, jComponent);
     AngleWithiComponent = CalculateAngleWithiComponent(iComponent, jComponent);
 }
Beispiel #3
0
 internal static void ChangeAngleType(Graphics GraphicsObj = null)
 {
     CurrentAngleType = Settings.CurrentAngleType;
 }