Skip to content

Convert from degrees to radians

Description

Convert from degrees to radians

Usage

<Expr>$radians()

Value

A polars expression

Examples

library("polars")

pl$DataFrame(a = c(-720, -540, -360, -180, 0, 180, 360, 540, 720))$
  with_columns(radians = pl$col("a")$radians())
#> shape: (9, 2)
#> ┌────────┬────────────┐
#> │ a      ┆ radians    │
#> │ ---    ┆ ---        │
#> │ f64    ┆ f64        │
#> ╞════════╪════════════╡
#> │ -720.0 ┆ -12.566371 │
#> │ -540.0 ┆ -9.424778  │
#> │ -360.0 ┆ -6.283185  │
#> │ -180.0 ┆ -3.141593  │
#> │ 0.0    ┆ 0.0        │
#> │ 180.0  ┆ 3.141593   │
#> │ 360.0  ┆ 6.283185   │
#> │ 540.0  ┆ 9.424778   │
#> │ 720.0  ┆ 12.566371  │
#> └────────┴────────────┘