2012-02-18 14:15:42 -07:00
|
|
|
// compile
|
2010-05-24 18:22:51 -06:00
|
|
|
|
|
|
|
// Copyright 2010 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2015-07-10 17:17:11 -06:00
|
|
|
// https://golang.org/issue/806
|
2010-05-24 18:22:51 -06:00
|
|
|
// triggered out of registers on 8g
|
|
|
|
|
2012-02-03 12:43:24 -07:00
|
|
|
package bug283
|
2010-05-24 18:22:51 -06:00
|
|
|
|
|
|
|
type Point struct {
|
|
|
|
x int
|
|
|
|
y int
|
|
|
|
}
|
|
|
|
|
|
|
|
func dist(p0, p1 Point) float64 {
|
|
|
|
return float64((p0.x-p1.x)*(p0.x-p1.x) + (p0.y-p1.y)*(p0.y-p1.y))
|
|
|
|
}
|