int main(int argc, char* argv[])
{
  Point A;
  double a,b;
  int c,d;
  std::cout << A.Add(a,b) << std::endl;
  std::cout << A.Add(c,d) << std::endl;
  return 0;
}
예제 #2
0
Point TranslateCoordinates(Point p, Rect world, Rect view) {
  Point cw = world.Center();
  Point slope = p.Add(cw).Sub(view.Center());
  Point scaleFactor = world.ScaleFactorFor(view).Mul(1, -1);
  return scaleFactor.Mul(slope).Add(cw);
  //  return Point(
  //     sf.x * (p.x + cw.x - cv.x) + cw.x,
  //    -sf.y * (p.y + cw.y - cv.y) + cw.y
  //  );
}
예제 #3
0
void Point_Add(Point &point, Point &p)
{
	point.Add(p);
}