コード例 #1
0
 public ExposureBias(SRational srational)
 {
     if (srational != null && srational.ToInt() != 0)
     {
         this.srational = srational;
     }
     else
     {
         this.srational = new SRational();
     }
 }
コード例 #2
0
        public ExposureBias(string exposureBias)
        {
            if (string.IsNullOrEmpty(exposureBias))
            {
                this.srational = new SRational();
            }
            else
            {
                // Expected format is {numerator}/{denominator}
                string[] splitString = exposureBias.Split('/');

                if (splitString.Length == 2)
                {
                    int numerator   = Convert.ToInt32(splitString[0]);
                    int denominator = Convert.ToInt32(splitString[1]);

                    this.srational = new SRational(numerator, denominator);
                }
                else
                {
                    throw new ArgumentException("Aperture was not of expected format:" + exposureBias);
                }
            }
        }
コード例 #3
0
 public ExposureBias()
 {
     this.srational = new SRational();
 }