Protocol

VectorArithmetic

A type that can serve as the animatable data of an animatable type.

Declaration

protocol VectorArithmetic

Overview

VectorArithmetic extends the AdditiveArithmetic protocol with scalar multiplication and a way to query the vector magnitude of the value. Use this type as the animatableData associated type of a type that conforms to the Animatable protocol.

Topics

Instance Properties

var magnitudeSquared: Double

Returns the dot-product of this vector arithmetic instance with itself.

Required.

Instance Methods

func scale(by: Double)

Multiplies each component of this value by the given value.

Required.

See Also

Geometry

struct GeometryProxy

A proxy for access to the size and coordinate space (for anchor resolution) of the container view.

struct GeometryReader

A container view that defines its content as a function of its own size and coordinate space.

protocol GeometryEffect

An effect that changes the visual appearance of a view, largely without changing its ancestors or descendents.

struct Angle

A geometric angle whose value you access in either radians or degrees.

struct Anchor

An opaque value derived from an anchor source and a particular view.