blob: 1f7f6e04104c7c14af04fae2bef1e804766e8901 [file] [log] [blame]
Rémy Oudompheng2ece2f52012-02-18 22:15:42 +01001// compile
Russ Cox6a060202010-05-24 17:22:51 -07002
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 Fitzpatrick2ae77372015-07-10 17:17:11 -06007// https://golang.org/issue/806
Russ Cox6a060202010-05-24 17:22:51 -07008// triggered out of registers on 8g
9
Brad Fitzpatrick040fe322012-02-03 11:43:24 -080010package bug283
Russ Cox6a060202010-05-24 17:22:51 -070011
12type Point struct {
13 x int
14 y int
15}
16
17func 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}