command
Version:
v0.0.0-...-60194e6
Opens a new window with list of versions in this module.
Published: Dec 9, 2020
License: Unlicense
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
1232_check-if-it-is-a-straight-line
如果len(coordinates) == 2
, 直接返回true
.
- 保存第一个坐标
a
- 寻找第一个与
a
不相同的b
, 若b
不存在, 或b
为最后一个元素, 直接返回true
- 通过
a
, b
计算斜率
- 遍历余下所有元素, 查看是否符合
注意, 坐标全是int, 小心计算.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.