Files
LeetCode-Go/leetcode/1037.Valid-Boomerang/1037. Valid Boomerang.go
2020-08-12 20:12:33 +08:00

6 lines
183 B
Go

package leetcode
func isBoomerang(points [][]int) bool {
return (points[0][0]-points[1][0])*(points[0][1]-points[2][1]) != (points[0][0]-points[2][0])*(points[0][1]-points[1][1])
}