cos example

$solLongitude  = $solAnomoly + 0.0334405 * sin($solAnomoly);
        $solLongitude += 4.93289 + 3.49066E-4 * sin(2 * $solAnomoly);

        // get quadrant         $solLongitude = $this->_range($solLongitude$fullCircle);

        if (($solLongitude / $quarterCircle) - intval($solLongitude / $quarterCircle) == 0) {
            $solLongitude += 4.84814E-6;
        }

        // solar ascension         $solAscension = sin($solLongitude) / cos($solLongitude);
        $solAscension = atan2(0.91746 * $solAscension, 1);

        // adjust quadrant         if ($solLongitude > $threeQuarterCircle) {
            $solAscension += $fullCircle;
        } else if ($solLongitude > $quarterCircle) {
            $solAscension += $halfCircle;
        }

        // solar declination         $solDeclination  = 0.39782 * sin($solLongitude);
        
    if ((int) $angle == $angle && $angle % 90 == 0) {
      $imprecision = 0;
      $correction = 0;
    }
    else {
      $imprecision = -0.00001;
      $correction = 0.5;
    }

    // Do the trigonometry, applying imprecision fixes where needed.     $rad = deg2rad($angle);
    $cos = cos($rad);
    $sin = sin($rad);
    $a = $this->width * $cos;
    $b = $this->height * $sin + $correction;
    $c = $this->width * $sin;
    $d = $this->height * $cos + $correction;
    if ((int) $angle == $angle && in_array($angle[60, 150, 300])) {
      $a = $this->fixImprecision($a$imprecision);
      $b = $this->fixImprecision($b$imprecision);
      $c = $this->fixImprecision($c$imprecision);
      $d = $this->fixImprecision($d$imprecision);
    }

    
Home | Imprint | This part of the site doesn't use cookies.