Ejemplo n.º 1
0
        public Acceleration(SpeedRate x, SpeedRate y, SpeedRate z)
        {
            var xyx = Math.Sqrt(Math.Pow(x.TotalMetersPerSecondPerSecond, 2)
                                + Math.Pow(y.TotalMetersPerSecondPerSecond, 2)
                                + Math.Pow(z.TotalMetersPerSecondPerSecond, 2));
            var xy = Math.Sqrt(Math.Pow(x.TotalMetersPerSecondPerSecond, 2)
                               + Math.Pow(y.TotalMetersPerSecondPerSecond, 2));

            SpeedRate = xyx.MetersPerSecondPerSecond();
            var angleH = Math.Atan2(y.TotalMetersPerSecondPerSecond, x.TotalMetersPerSecondPerSecond);
            var angleV = Math.Atan2(z.TotalMetersPerSecondPerSecond, xy);

            Angle = new Angle2(angleH, angleV);
        }
Ejemplo n.º 2
0
 public int CompareTo(SpeedRate other) => TotalMetersPerSecondPerSecond.CompareTo(other.TotalMetersPerSecondPerSecond);
Ejemplo n.º 3
0
 public bool Equals(SpeedRate other) => Math.Abs(TotalMetersPerSecondPerSecond - other.TotalMetersPerSecondPerSecond) < UnitConstants.EqualityComparisonEpsilon;
Ejemplo n.º 4
0
 internal static Acceleration AtAngle(this SpeedRate speedRate, Angle2 angle)
 {
     return(new Acceleration(speedRate, angle));
 }
Ejemplo n.º 5
0
 public Acceleration(SpeedRate speedRate, Angle angleH, Angle angleV)
     : this(speedRate, new Angle2(angleH, angleV))
 {
 }
Ejemplo n.º 6
0
 public Acceleration(SpeedRate speedrate, Angle2 angle)
 {
     SpeedRate = speedrate;
     Angle     = angle;
 }