Skip to content

Commit

Permalink
Reduce floating point precision, refs #31
Browse files Browse the repository at this point in the history
This shaved 88KB off the size of the page!
  • Loading branch information
simonw committed Aug 20, 2020
1 parent afd934f commit 883a3b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/template_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ async def tide_data_for_place(place_slug, day=None):
"maximas": maximas,
"heights": heights[1:-1],
"lowest_tide": list(sorted(heights[1:-1], key=lambda t: t["feet"]))[0],
"svg_points": " ".join("{},{}".format(i, pct) for i, pct in svg_points),
"svg_points": " ".join("{},{:.2f}".format(i, pct) for i, pct in svg_points),
}
info.update(
{
Expand Down

0 comments on commit 883a3b0

Please sign in to comment.