Skip to content

Commit

Permalink
Float formatting (quii#262)
Browse files Browse the repository at this point in the history
In this example should be %f format to get the error exactly like further in the text
  • Loading branch information
aivchen authored Jan 30, 2020
1 parent f019221 commit 5c05bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion math.md
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ func secondHand(w io.Writer, t time.Time) {
p = Point{p.X * secondHandLength, p.Y * secondHandLength} // scale
p = Point{p.X, -p.Y} // flip
p = Point{p.X + clockCentreX, p.Y + clockCentreY} // translate
fmt.Fprintf(w, `<line x1="150" y1="150" x2="%.3f" y2="%.3f" style="fill:none;stroke:#f00;stroke-width:3px;"/>`, p.X, p.Y)
fmt.Fprintf(w, `<line x1="150" y1="150" x2="%f" y2="%f" style="fill:none;stroke:#f00;stroke-width:3px;"/>`, p.X, p.Y)
}

const svgStart = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Expand Down

0 comments on commit 5c05bda

Please sign in to comment.