polarToCartesian.php
Table of Contents
Functions
- polarToCartesian() : array{x: float, y: float}
- Converts a polar coordinate to a cartesian vector.
Functions
polarToCartesian()
Converts a polar coordinate to a cartesian vector.
polarToCartesian(array{angle: float, radius: float} $vector[, bool $degrees = true ][, bool $throwable = false ]) : array{x: float, y: float}
Parameters
- $vector : array{angle: float, radius: float}
-
Polar coordinates with keys 'angle' and 'radius'.
- $degrees : bool = true
-
Whether the angle is in degrees (default: true).
- $throwable : bool = false
Tags
Return values
array{x: float, y: float} —Cartesian representation with keys 'x' and 'y'.