# PolarScaler

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-livecharts/measure/struct-polarscaler/

**struct** · [`ferroui-livecharts`](/docs/0.5.0/api/ferroui-livecharts/) · v0.5.0

```rust
struct PolarScaler
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L34)

## Members

- [`center`](#struct_field-center)
- [`min_radius`](#struct_field-min_radius)
- [`max_radius`](#struct_field-max_radius)
- [`min_angle`](#struct_field-min_angle)
- [`max_angle`](#struct_field-max_angle)
- [`inner_radius`](#struct_field-inner_radius)
- [`new`](#function-new)
- [`get_angle`](#function-get_angle)
- [`to_pixels`](#function-to_pixels)
- [`to_pixels_with_angle_in_degrees`](#function-to_pixels_with_angle_in_degrees)
- [`to_chart_values`](#function-to_chart_values)

<a id="struct_field-center"></a>

### center

```rust
center: ferroui_base::Point
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L35)

<a id="struct_field-min_radius"></a>

### min_radius

```rust
min_radius: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L36)

<a id="struct_field-max_radius"></a>

### max_radius

```rust
max_radius: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L37)

<a id="struct_field-min_angle"></a>

### min_angle

```rust
min_angle: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L38)

<a id="struct_field-max_angle"></a>

### max_angle

```rust
max_angle: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L39)

<a id="struct_field-inner_radius"></a>

### inner_radius

```rust
inner_radius: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L40)

<a id="function-new"></a>

### new

```rust
fn new(plot: Rect, options: PolarScaleOptions) -> Result<Self, ScaleError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L47)

<a id="function-get_angle"></a>

### get_angle

```rust
fn get_angle(self: Self, angle: f64) -> f64
```

Source-compatible angle convention: angle values are measured from zero;
the bounds set the angular interval length, not its angular origin.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L100)

<a id="function-to_pixels"></a>

### to_pixels

```rust
fn to_pixels(self: Self, angle: f64, radius: f64) -> Point
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L103)

<a id="function-to_pixels_with_angle_in_degrees"></a>

### to_pixels_with_angle_in_degrees

```rust
fn to_pixels_with_angle_in_degrees(self: Self, angle: f64, radius: f64) -> Point
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L106)

<a id="function-to_chart_values"></a>

### to_chart_values

```rust
fn to_chart_values(self: Self, point: Point) -> Point
```

Inverse of `to_pixels`, using `atan2` so axes and every quadrant work.
Values are normalized to one revolution starting at the initial rotation.
This corrects the upstream inverse's division by zero and extra MinAngle.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/measure/polar_scaler.rs#L120)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
