Rémy Oudompheng | 2ece2f5 | 2012-02-18 22:15:42 +0100 | [diff] [blame] | 1 | // compile |
Russ Cox | 6a06020 | 2010-05-24 17:22:51 -0700 | [diff] [blame] | 2 | |
| 3 | // Copyright 2010 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
Brad Fitzpatrick | 2ae7737 | 2015-07-10 17:17:11 -0600 | [diff] [blame] | 7 | // https://golang.org/issue/806 |
Russ Cox | 6a06020 | 2010-05-24 17:22:51 -0700 | [diff] [blame] | 8 | // triggered out of registers on 8g |
| 9 | |
Brad Fitzpatrick | 040fe32 | 2012-02-03 11:43:24 -0800 | [diff] [blame] | 10 | package bug283 |
Russ Cox | 6a06020 | 2010-05-24 17:22:51 -0700 | [diff] [blame] | 11 | |
| 12 | type Point struct { |
| 13 | x int |
| 14 | y int |
| 15 | } |
| 16 | |
| 17 | func dist(p0, p1 Point) float64 { |
| 18 | return float64((p0.x-p1.x)*(p0.x-p1.x) + (p0.y-p1.y)*(p0.y-p1.y)) |
| 19 | } |