摘要: RGB 转灰度 //rgba(grey,grey,grey,1)function rgb2Grey(r,g,b){var grey=Math.round((r*299 + g*587 + b*114 + 500) / 1000)return grey} 判断两种颜色相似程度 //rbgfunctio 阅读全文
posted @ 2019-07-15 14:36 ꧁执笔小白꧂ 阅读(2793) 评论(0) 推荐(0)
摘要: Windows 系统下的 vs 中可以使用 _kbhit() 函数来获取键盘事件,使用时需要加入 conio.h 头文件 #include <conio.h> #include <iostream> using namespace std; int main() { int ch; while (1 阅读全文
posted @ 2019-07-15 10:22 ꧁执笔小白꧂ 阅读(4557) 评论(0) 推荐(0)