Skip to content

Commit 5c05bda

Browse files
authored
Float formatting (quii#262)
In this example should be %f format to get the error exactly like further in the text
1 parent f019221 commit 5c05bda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

math.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ func secondHand(w io.Writer, t time.Time) {
10221022
p = Point{p.X * secondHandLength, p.Y * secondHandLength} // scale
10231023
p = Point{p.X, -p.Y} // flip
10241024
p = Point{p.X + clockCentreX, p.Y + clockCentreY} // translate
1025-
fmt.Fprintf(w, `<line x1="150" y1="150" x2="%.3f" y2="%.3f" style="fill:none;stroke:#f00;stroke-width:3px;"/>`, p.X, p.Y)
1025+
fmt.Fprintf(w, `<line x1="150" y1="150" x2="%f" y2="%f" style="fill:none;stroke:#f00;stroke-width:3px;"/>`, p.X, p.Y)
10261026
}
10271027

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

0 commit comments

Comments
 (0)