1 // $G $F.go && $L $F.$A && ./$A.out
3 // Copyright 2009 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.
13 pi = /* the usual */ 3.14159265358979323
29 func (p *Point) Initialize(x, y int) *Point {
34 func (p *Point) Distance() int {
35 return p.x * p.x + p.y * p.y
46 func min(x, y int) int {
47 if x < y { return x; }
51 func swap(x, y int) (u, v int) {
57 func control_structs() {
58 var p *Point = new(Point).Initialize(2, 3)
64 for j := 0; j < i; j++ {
76 case i == 0, i == 1, i == j: