Last active
December 10, 2020 02:45
-
-
Save mcsee/3c518ce3708147f653813bf7a7c1865d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
final class Point { | |
private $angle; | |
private $distance; | |
public function x() { | |
return $this->distance * cos($this->angle); | |
} | |
public function y() { | |
return $this->distance * sin($this->angle); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment