// compute the time of Asr
        private double ComputeAsr(AsrJuristicMethods method, double jDate, double t)  // Shafii: step=1, Hanafi: step=2
        {
            var step = 1;

            if (method == AsrJuristicMethods.Hanafi)
            {
                step = 2;
            }
            var D = this.SunDeclination(jDate + t);
            var G = -this.darccot(step + this.dtan(Math.Abs(this._latitude - D)));

            return(this.ComputeTime(jDate, G, t));
        }
Exemplo n.º 2
0
        /// <summary>
        /// get asr shadow factor
        /// </summary>
        /// <returns></returns>
        private int AsrFactor(AsrJuristicMethods asrJuristicMethod)
        {
            //asrFactor: function (asrParam) {
            //	var factor = { Standard: 1, Hanafi: 2 }[asrParam];
            //	return factor || this.eval(asrParam);
            //}

            // Shafii: factor=1, Hanafi: factor=2
            switch (asrJuristicMethod)
            {
            case AsrJuristicMethods.Shafii:
                return(1);

            case AsrJuristicMethods.Hanafi:
                return(2);

            default:
                throw new ArgumentOutOfRangeException(nameof(AsrJuristicMethod));
            }
        }
 // Shafii: step=1, Hanafi: step=2
 // compute the time of Asr
 private double ComputeAsr(AsrJuristicMethods method, double jDate, double t)
 {
     var step = 1;
     if (method == AsrJuristicMethods.Hanafi)
     {
         step = 2;
     }
     var D = this.SunDeclination(jDate + t);
     var G = -this.darccot(step + this.dtan(Math.Abs(this._latitude - D)));
     return this.ComputeTime(jDate, G, t);
 }