Re: Mod-function?
| From: | Rasmus Lerdorf | Date: | Sat, 08 Sep 2001 19:26:06 +0000 |
| Subject: | Re: Mod-function? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66542@lists.php.net to get a copy of this message | ||
It is an operator in PHP: %
ie. echo 3 % 2;
-Rasmus
On Sat, 8 Sep 2001, Ville Mattila wrote:
> Hi folks,
>
> I found this kind of formulae which should calculate the distance between two points on earth:
>
> tc1=mod(atan2(sin(lon1-lon2)*cos(lat2),
> cos(lat1)*sin(lat2)-sin(lat1)*cos(lat2)*cos(lon1-lon2)), 2*pi)
>
> This is not PHP code, but now I would need the same formulae in PHP. But I can't find what
> that mod(x, x) -function does. Any idea is there corresponding function in PHP?
>
> Cheers,
> - Ville
>
> .................................................................
> Ville Mattila
> Ikaalinen, Finland
> ville.mattila@pilotmedia.fi
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>