Skip to content

Commit

Permalink
#308: Add formatting for poly file
Browse files Browse the repository at this point in the history
  • Loading branch information
priscavdsluis committed Nov 14, 2022
1 parent a3d5799 commit 80f3ff4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hydrolib/core/io/dflowfm/polyfile/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def serialize_point(point: Point, config: SerializerConfig) -> str:
str: The serialised equivalent of this Point
"""
space = 4 * " "
return space + space.join(str(v) for v in Serializer._get_point_values(point))
format = lambda v: f"{v:{config.float_format}}"
return space + space.join(format(v) for v in Serializer._get_point_values(point))

@staticmethod
def _get_point_values(point: Point) -> Generator[float, None, None]:
Expand Down

0 comments on commit 80f3ff4

Please sign in to comment.