Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 c++ 创建一个算法。我有一个 320*240 像素的平面和一条线 (y=ax + b),它将平面分成 2 个多边形。鉴于这些信息,我想问一下,是否有可能知道新的像素(x,y)属于 2 个多边形中的哪一个。
你可以根据if分开
y<ax+b or y>ax+b