This program classifies quadrilaterals. I'm not sure why my method just won't work, the coordinates I used were (08,4),nd (5,5). All my other methods work so I don't think its because of my formula.
if((ab == bc && cd == da) || (bc == cd && da == ab))
in your case any rectangle is kite ( 1 + 2 == 1 + 2)
if((ab + bc) == (cd + da) || (bc + cd) == (da + ab)){}
如果不放在方括号中,则编译器将查看元素的优先级。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.