Use simple vector maths:
Code:
  X := StartP.x - EndP.x;
  Y := StartP.y - EndP.y;
  Strength := SQR ((x*x) + (y*y));