Beispiel #1
0
 public AyParticle(AyVector2 _position, AyVector2 _velocity, double _life, Color _color, double _size)
 {
     this.Position = _position;
     this.Velocity = _velocity;
     this.Life     = _life;
     this.Color    = _color;
     this.Size     = _size;
 }
Beispiel #2
0
 /// <summary>
 /// 向量相加
 /// </summary>
 /// <param name="v"></param>
 /// <returns></returns>
 public AyVector2 Add(AyVector2 v)
 {
     return(new AyVector2(this.X + v.X, this.Y + v.Y));
 }
Beispiel #3
0
 /// <summary>
 /// 向量相减
 /// </summary>
 /// <param name="v"></param>
 /// <returns></returns>
 public AyVector2 Subtract(AyVector2 v)
 {
     return(new AyVector2(this.X - v.X, this.Y - v.Y));
 }
Beispiel #4
0
 /// <summary>
 /// 向量 点积运算
 /// 作者AY
 /// </summary>
 /// <returns></returns>
 public double Dot(AyVector2 v)
 {
     return(this.X * v.X + this.Y * v.Y);
 }