public Vector2D(Vector2F copy) { x = copy.x; y = copy.y; }
public float Project(Vector2F p) { return((p - Center).Dot(Direction)); }
void update_from_endpoints(Vector2F p0, Vector2F p1) { Center = 0.5f * (p0 + p1); Direction = p1 - p0; Extent = 0.5f * Direction.Normalize(); }
public Segment2f(Vector2F center, Vector2F direction, float extent) { Center = center; Direction = direction; Extent = extent; }