skia
    Preparing search index...

    Interface VectorHelpers

    Functions for manipulating vectors. It is Loosely based off of SkV3 in SkM44.h but Skia also has SkVec2 and Skv4. This combines them and works on vectors of any length.

    interface VectorHelpers {
        add(a: VectorN, b: VectorN): VectorN;
        cross(a: Vector3, b: Vector3): Vector3;
        dist(a: VectorN, b: VectorN): number;
        dot(a: VectorN, b: VectorN): number;
        length(v: VectorN): number;
        lengthSquared(v: VectorN): number;
        mulScalar(v: VectorN, s: number): VectorN;
        normalize(v: VectorN): VectorN;
        sub(a: VectorN, b: VectorN): VectorN;
    }
    Index

    Methods