Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

vec2

2D Vector Type (f64)

A 2-component vector using 32.32 fixed-point coordinates.

Operations

  • Vector arithmetic: add, sub, mul, div
  • Dot product and cross product (returns scalar)
  • Norm (magnitude) calculation
  • Component-wise abs, floor

Fully qualified path: cairo_fp::f64::types::vec2

Free functions

abs
add
cross
div
dot
floor
mul
norm
rem
sub

Structs

Vec2A 2D vector with fixed-point components.

Traits

Vec2TraitTrait for Vec2 operations.

Impls