"景先生毕设|www.jxszl.com

C# Channels类代码示例

2023-12-29 17:42编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中Channels类的典型用法代码示例。如果您正苦于以下问题:C#Channels类的具体用法?C#Channels怎么用?C#Channels使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:Average publicstaticfloatAverage(thisColorcolor,Channelschannels) { floataverage=0; intaxisCount=0; if(channels.Contains(Channels.R)) { average+=color.r; axisCount+=1; } if(channels.Contains(Channels.G)) { average+=color.g; axisCount+=1; } if(channels.Contains(Channels.B)) { average+=color.b; axisCount+=1; } if(channels.Contains(Channels.A)) { average+=color.a; axisCount+=1; } returnaverage/axisCount; }
原文链接:http://www.jxszl.com/biancheng/C/556722.html