public void GetRelations(int index, out VH verticalHorizontal, out int maxSize, out int currentDistance) { currentDistance = _basicCalculator.EuclideanDistance(_points[index], _points[(index + 1) % _currentPointCount]); verticalHorizontal = _verticalHorizontals[index]; maxSize = _maxSizes[index]; }
private Point ChangeDistance(Point fixedPoint, Point movingPoint, int newDistance) { var currentDistance = _basicCalculator.EuclideanDistance(fixedPoint, movingPoint); double ratio = (double)newDistance / currentDistance; return(new Point((int)(fixedPoint.X + ratio * (movingPoint.X - fixedPoint.X)), (int)(fixedPoint.Y + ratio * (movingPoint.Y - fixedPoint.Y)))); }