1 Star 0 Fork 0

妙音 / images

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dot.go 307 Bytes
一键复制 编辑 原始数据 按行查看 历史
妙音 提交于 2021-02-06 11:22 . 位置接近的去除
package images
import (
"fmt"
)
// Dot 点.
type Dot struct {
X int
Y int
Distance int
}
// Space 距离.
func (d *Dot) Space(o *Dot) int {
return Abs(d.X-o.X) + Abs(d.Y-o.Y)
}
// String 点.
func (d *Dot) String() string {
return fmt.Sprintf("(%d, %d): %d", d.X, d.Y, d.Distance)
}
Go
1
https://gitee.com/xuender/images.git
git@gitee.com:xuender/images.git
xuender
images
images
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891