Merge pull request #219 from smartczy/master

fix errors
This commit is contained in:
Unknwon
2016-01-25 02:38:40 -05:00
3 changed files with 4 additions and 4 deletions

View File

@@ -238,9 +238,9 @@ func main() {
我们知道方法将指针作为接收者不是必须的,如下面的例子,我们只是需要 `Point3` 的值来做计算:
```go
type Point3 struct { x, y, z float }
type Point3 struct { x, y, z float64 }
// A method on Point3
func (p Point3) Abs float {
func (p Point3) Abs() float64 {
return math.Sqrt(p.x*p.x + p.y*p.y + p.z*p.z)
}
```