
封装好的函数
Hysea.
写博客留下自学的痕迹
展开
-
Windows画太极函数(已封装)
Windows画太极void Taiji(HDC hdc,int xLeft,int yTop,int xRight,int yBottom){ HBRUSH hBrush; HBRUSH hOldBrush; HPEN hPen; hBrush = CreateSolidBrush(RGB(255, 255, 255)); hOldBrush = (HBRUSH)SelectObject(hdc,hBrush); Chord(hdc,xLeft,yTop,xRight,.原创 2020-06-14 16:47:56 · 1333 阅读 · 0 评论 -
Windows画五角星
Windows画五角星void drawstar(HDC hdc,double x,double y,double line){ double linelength=line; double next_x=x,next_y=y; MoveToEx(hdc,next_x,next_y,NULL); /*下一个点:x:是该点的x减去边长乘cos72度*/ /*下一个点:y:是该点的y加上边长乘sin72度*/ next_x=next_x-linelength*cos(2*PI/5); n.原创 2020-06-06 23:01:58 · 614 阅读 · 0 评论 -
JavaScript RGB值和颜色代码相互转换
JavaScript根据RGB值求颜色代码function getColorCode(r,g,b){ var c="#"; c+=r.toString(16).length==1?"0"+r.toString(16):r.toString(16); c+=g.toString(16).length==1?"0"+g.toString(16):g.toString(16); c+=b.to...原创 2020-05-01 17:36:24 · 668 阅读 · 0 评论 -
JavaScript计算矩阵相乘
JavaScript计算矩阵相乘封装好的函数,拿去直接用function matrixMul(a,b){ var c=new Array(a.length); for(var i=0;i<a.length;i++) { c[i]=new Array(b[0].length); for(var j=0;j<b[0].length;j++) { c[i][j...原创 2020-05-01 17:23:06 · 2641 阅读 · 0 评论