From: Matt Joiner Date: Mon, 21 Mar 2016 21:33:08 +0000 (+1100) Subject: Client.WriteStatus: Raise the precision of the completion percentage X-Git-Tag: v1.0.0~825 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=782589e2b9c28cc4ab9f7bf76e016b2a1a853d1f;p=btrtrc.git Client.WriteStatus: Raise the precision of the completion percentage --- diff --git a/client.go b/client.go index 885b204e..6d8d7fbb 100644 --- a/client.go +++ b/client.go @@ -248,7 +248,7 @@ func (cl *Client) WriteStatus(_w io.Writer) { } fmt.Fprint(w, "\n") if t.haveInfo() { - fmt.Fprintf(w, "%f%% of %d bytes", 100*(1-float32(t.bytesLeft())/float32(t.length)), t.length) + fmt.Fprintf(w, "%f%% of %d bytes", 100*(1-float64(t.bytesLeft())/float64(t.length)), t.length) } else { w.WriteString("") }