Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Vec4Trait

Trait for Vec4 operations.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait

trait Vec4Trait

Trait functions

new

Creates a new vector from components.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::new

fn new(x: Fixed, y: Fixed, z: Fixed, w: Fixed) -> Vec4

splat

Creates a vector with all components set to the same value.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::splat

fn splat(v: Fixed) -> Vec4

abs

Component-wise absolute value.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::abs

fn abs(self: Vec4) -> Vec4

dot

Dot product.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::dot

fn dot(self: Vec4, rhs: Vec4) -> Fixed

floor

Component-wise floor.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::floor

fn floor(self: Vec4) -> Vec4

norm

Vector magnitude (length).

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::norm

fn norm(self: Vec4) -> Fixed

add

Add scalar to all components.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::add

fn add(self: Vec4, scalar: Fixed) -> Vec4

sub

Subtract scalar from all components.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::sub

fn sub(self: Vec4, scalar: Fixed) -> Vec4

mul

Multiply all components by scalar.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::mul

fn mul(self: Vec4, scalar: Fixed) -> Vec4

div

Divide all components by scalar.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::div

fn div(self: Vec4, scalar: Fixed) -> Vec4

rem

Remainder of all components divided by scalar.

Fully qualified path: cairo_fp::f64::types::vec4::Vec4Trait::rem

fn rem(self: Vec4, scalar: Fixed) -> Vec4