Commit 6bcd2580 authored by Alberto Donizetti's avatar Alberto Donizetti Committed by Robert Griesemer

math/big: better SetFloat64 example in doc

Fixes #17221

Change-Id: Idaa2af6b8646651ea72195671d1a4b5c370a5a22
Reviewed-on: https://go-review.googlesource.com/29711Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
parent ac24388e
...@@ -31,7 +31,7 @@ setters, for instance: ...@@ -31,7 +31,7 @@ setters, for instance:
var z1 Int var z1 Int
z1.SetUint64(123) // z1 := 123 z1.SetUint64(123) // z1 := 123
z2 := new(Rat).SetFloat64(1.2) // z2 := 6/5 z2 := new(Rat).SetFloat64(1.25) // z2 := 5/4
z3 := new(Float).SetInt(z1) // z3 := 123.0 z3 := new(Float).SetInt(z1) // z3 := 123.0
Setters, numeric operations and predicates are represented as methods of Setters, numeric operations and predicates are represented as methods of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment