# [−][src]Trait nalgebra::RealField

    pub trait RealField: ComplexField<RealField = Self> + Lattice + RelativeEq<Self, Epsilon = Self, Epsilon = Self> + UlpsEq<Self> + Bounded + Signed {
        fn is_sign_positive(self) -> bool;
        fn is_sign_negative(self) -> bool;
        fn max(self, other: Self) -> Self;
        fn min(self, other: Self) -> Self;
        fn atan2(self, other: Self) -> Self;
        fn pi() -> Self;
        fn two_pi() -> Self;
        fn frac_pi_2() -> Self;
        fn frac_pi_3() -> Self;
        fn frac_pi_4() -> Self;
        fn frac_pi_6() -> Self;
        fn frac_pi_8() -> Self;
        fn frac_1_pi() -> Self;
        fn frac_2_pi() -> Self;
        fn frac_2_sqrt_pi() -> Self;
        fn e() -> Self;
        fn log2_e() -> Self;
        fn log10_e() -> Self;
        fn ln_2() -> Self;
        fn ln_10() -> Self;
    }

Trait shared by all reals.

Reals are equipped with functions that are commonly used on reals. The results of those functions only have to be approximately equal to the actual theoretical values.

## Required methods

### `fn is_sign_positive(self) -> bool`

### `fn is_sign_negative(self) -> bool`

### `fn max(self, other: Self) -> Self`

### `fn min(self, other: Self) -> Self`

### `fn atan2(self, other: Self) -> Self`

### `fn pi() -> Self`

### `fn two_pi() -> Self`

### `fn frac_pi_2() -> Self`

### `fn frac_pi_3() -> Self`

### `fn frac_pi_4() -> Self`

### `fn frac_pi_6() -> Self`

### `fn frac_pi_8() -> Self`

### `fn frac_1_pi() -> Self`

### `fn frac_2_pi() -> Self`

### `fn frac_2_sqrt_pi() -> Self`

### `fn e() -> Self`

### `fn log2_e() -> Self`

### `fn log10_e() -> Self`

### `fn ln_2() -> Self`

### `fn ln_10() -> Self`

Loading content...

## Implementations on Foreign Types

### `impl RealField for f64`[src]

#### `fn is_sign_positive(self) -> bool`[src]

#### `fn is_sign_negative(self) -> bool`[src]

#### `fn max(self, other: f64) -> f64`[src]

#### `fn min(self, other: f64) -> f64`[src]

#### `fn atan2(self, other: f64) -> f64`[src]

#### `fn pi() -> f64`[src]

Archimedes' constant.

#### `fn two_pi() -> f64`[src]

2.0 * pi.

#### `fn frac_pi_2() -> f64`[src]

pi / 2.0.

#### `fn frac_pi_3() -> f64`[src]

pi / 3.0.

#### `fn frac_pi_4() -> f64`[src]

pi / 4.0.

#### `fn frac_pi_6() -> f64`[src]

pi / 6.0.

#### `fn frac_pi_8() -> f64`[src]

pi / 8.0.

#### `fn frac_1_pi() -> f64`[src]

1.0 / pi.

#### `fn frac_2_pi() -> f64`[src]

2.0 / pi.

#### `fn frac_2_sqrt_pi() -> f64`[src]

2.0 / sqrt(pi).

#### `fn e() -> f64`[src]

Euler's number.

#### `fn log2_e() -> f64`[src]

log2(e).

#### `fn log10_e() -> f64`[src]

log10(e).

#### `fn ln_2() -> f64`[src]

ln(2.0).

#### `fn ln_10() -> f64`[src]

ln(10.0).

### `impl RealField for f32`[src]

#### `fn is_sign_positive(self) -> bool`[src]

#### `fn is_sign_negative(self) -> bool`[src]

#### `fn max(self, other: f32) -> f32`[src]

#### `fn min(self, other: f32) -> f32`[src]

#### `fn atan2(self, other: f32) -> f32`[src]

#### `fn pi() -> f32`[src]

Archimedes' constant.

#### `fn two_pi() -> f32`[src]

2.0 * pi.

#### `fn frac_pi_2() -> f32`[src]

pi / 2.0.

#### `fn frac_pi_3() -> f32`[src]

pi / 3.0.

#### `fn frac_pi_4() -> f32`[src]

pi / 4.0.

#### `fn frac_pi_6() -> f32`[src]

pi / 6.0.

#### `fn frac_pi_8() -> f32`[src]

pi / 8.0.

#### `fn frac_1_pi() -> f32`[src]

1.0 / pi.

#### `fn frac_2_pi() -> f32`[src]

2.0 / pi.

#### `fn frac_2_sqrt_pi() -> f32`[src]

2.0 / sqrt(pi).

#### `fn e() -> f32`[src]

Euler's number.

#### `fn log2_e() -> f32`[src]

log2(e).

#### `fn log10_e() -> f32`[src]

log10(e).

#### `fn ln_2() -> f32`[src]

ln(2.0).

#### `fn ln_10() -> f32`[src]

ln(10.0).

Loading content...

## Implementors

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)