Translating/transforming? list of points from its center with an offset/distance
Well, I'm currently trying to move a list of points using its center as reference with a desired offset. But I'm having problems. I have implemented the current function: public static IEnumerable<Point> Translate(this IEnumerable<Vector2> points, float offset, Vector2 pivot) { foreach (Vector2 v in points) { float magnitude = (v - pivot).magnitude; Vector2 n = (v - pivot).normalized; Vector2 _v = n * (magnitude + offset) + pivot; yield return new Point(_v); } } Note: Point class is an own implementation very similar to System.Drawing.Point . I calculate the normal (the direction between the