alloy::ops

Trait Dot

source
pub trait Dot<Rhs: ?Sized = Self> {
    type Output;

    // Required method
    fn dot(&self, rhs: &Rhs) -> Self::Output;
}
Expand description

Trait for an algabraic scalar product between two equal-length sequences of numbers and returns a single value.

See Dot Product for more information.

Required Associated Types§

source

type Output

The output of this operation.

In most cases, this will be f32, since Alloy is largely built around 32-bit floating point numbers; though this can be configured.

Required Methods§

source

fn dot(&self, rhs: &Rhs) -> Self::Output

Performs the dot-product between two values, and returns the output value.

§Argument
  • rhs - the right side operand of the operation.

Implementations on Foreign Types§

source§

impl<const N: usize> Dot for [f32; N]

source§

type Output = f32

source§

fn dot(&self, other: &[f32; N]) -> Self::Output

source§

impl<const N: usize> Dot for [f64; N]

source§

type Output = f64

source§

fn dot(&self, other: &[f64; N]) -> Self::Output

Implementors§