Struct plutchik::Wheel [] [src]

pub struct Wheel {
    pub radians: f32,
    pub weight: f32,
}

Representation of an emotion in the form of a Plutchik Wheel. Useful for emotional tagging and aesthetic comparisons.

Fields

Methods

impl Wheel
[src]

Construct the mean (average) emotion wheel given a number of other emotions.

Compare two Wheels and return the result as a difference weight where 0 is the minimum distance and 1 is the maximum. Determine the difference as the magnitude of the vector that separates both points on the wheel.

Return the closest matching Emotion variant to the current state of the Wheel.

Return the closest n number of emotions to the current state of the wheel.

Return the wheel's opposite.

Trait Implementations

impl Copy for Wheel
[src]

impl Clone for Wheel
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Wheel
[src]

Formats the value using the given formatter.

impl PartialEq for Wheel
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Rand for Wheel
[src]

Generates a random instance of this type using the specified source of randomness. Read more

impl<'a> Into<[f32; 2]> for &'a Wheel
[src]

Performs the conversion.

impl<'a> Into<[f32; 2]> for Wheel
[src]

Performs the conversion.

impl<'a> From<[f32; 2]> for Wheel
[src]

Performs the conversion.