ch06

package
v0.0.0-...-e0f2298 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

有颜色的点 author: baoqiang time: 2019/3/17 下午8:07

方法声明 author: baoqiang time: 2019/3/17 下午7:53

字节数组 author: baoqiang time: 2019/3/17 下午8:24

更改struct的值 author: baoqiang time: 2019/3/17 下午8:01

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(p, q Point) float64

func RunColoredPoint

func RunColoredPoint()

func RunColoredPoint1

func RunColoredPoint1()

func RunColoredPoint2

func RunColoredPoint2()

func RunColoredPoint3

func RunColoredPoint3()

func RunIntSet

func RunIntSet()

func RunPath

func RunPath()

func RunValues

func RunValues()

Types

type ColoredPoint

type ColoredPoint struct {
	Point
	Color color.RGBA
}

type ColoredPoint2

type ColoredPoint2 struct {
	*Point
	Color color.RGBA
}

type IntSet

type IntSet struct {
	// contains filtered or unexported fields
}

func (*IntSet) Add

func (s *IntSet) Add(x int)

func (*IntSet) Has

func (s *IntSet) Has(x int) bool

func (*IntSet) String

func (s *IntSet) String() string

func (*IntSet) UnionWith

func (s *IntSet) UnionWith(t *IntSet)

type Path

type Path []Point

func (Path) Distance

func (path Path) Distance() float64

type Point

type Point struct {
	X, Y float64
}

func (Point) Distance

func (p Point) Distance(q Point) float64

func (*Point) ScaleBy

func (p *Point) ScaleBy(factor float64)

type Values

type Values map[string][]string

func (Values) Add

func (v Values) Add(key, value string)

func (Values) Get

func (v Values) Get(key string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL