Exemplo n.º 1
0
 private void drawMolecule(SolidBrush solidBrush, Molecule molecule)
 {
     canvas.FillEllipse(solidBrush,
                        (int)(molecule.X - molecule.Radius), (int)(molecule.Y - molecule.Radius),
                        (int)(molecule.Radius * 2), (int)(molecule.Radius * 2));
 }
Exemplo n.º 2
0
 public static double Distance(Molecule molecule1, Molecule molecule2)
 {
     return(Math.Sqrt((molecule2.x - molecule1.x) * (molecule2.x - molecule1.x) +
                      (molecule2.y - molecule1.y) * (molecule2.y - molecule1.y)));
 }