# StdDevValue

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dynamic-data/aggregation/trait-stddevvalue/

**trait** · [`ferroui-dynamic-data`](/docs/0.5.0/api/ferroui-dynamic-data/) · v0.5.0

```rust
trait StdDevValue: Copy + 'static
```

A value whose standard deviation the aggregations compute (`int`, `long`, `float`, `double`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L19)

## Members

- [`Moment`](#assoc_type-moment)
- [`ZERO`](#assoc_const-zero)
- [`moment`](#function-moment)
- [`plus`](#function-plus)
- [`minus`](#function-minus)
- [`times`](#function-times)
- [`deviation`](#function-deviation)
- [`to_f64`](#function-to_f64)

<a id="assoc_type-moment"></a>

### Moment

```rust
type Moment: Copy + 'static
```

The type of the sums of the values and of their squares: `i64` for `i32` and `i64` (upstream
widens `int` to `long`), the type itself for `f32` and `f64`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L22)

<a id="assoc_const-zero"></a>

### ZERO

```rust
const ZERO: <Self as >::Moment
```

The sum of no values.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L25)

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

### moment

```rust
fn moment(self: Self) -> <Self as >::Moment
```

The value as a moment.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L28)

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

### plus

```rust
fn plus(left: <Self as >::Moment, right: <Self as >::Moment) -> <Self as >::Moment
```

`left + right`, wrapping on overflow for the integers (C#'s unchecked arithmetic).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L31)

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

### minus

```rust
fn minus(left: <Self as >::Moment, right: <Self as >::Moment) -> <Self as >::Moment
```

`left - right`, wrapping on overflow for the integers.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L34)

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

### times

```rust
fn times(left: <Self as >::Moment, right: <Self as >::Moment) -> <Self as >::Moment
```

`left * right`, wrapping on overflow for the integers.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L37)

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

### deviation

```rust
fn deviation(count: i32, sum_of_items: <Self as >::Moment, sum_of_squares: <Self as >::Moment) -> f64
```

The sample standard deviation of `count` values (at least two) whose sum is
`sum_of_items` and the sum of whose squares is `sum_of_squares`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L41)

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

### to_f64

```rust
fn to_f64(self: Self) -> f64
```

The value as the result (the implicit conversion of upstream's `fallbackValue`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/aggregation/std_dev_ex.rs#L44)

## Trait implementations

- [`StdDevValue`](/docs/0.5.0/api/ferroui-dynamic-data/aggregation/trait-stddevvalue/)

## Availability

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