Vec4

Undocumented

  • A convenience initializer so you know it’s being used as a color vector.

    Note

    All values should be 0.0 <= value <= 1.0

    Declaration

    Swift

    public init(r: Float, g: Float, b: Float, a: Float)

    Parameters

    r

    The red amount.

    g

    The green amount.

    b

    The blue amount.

    a

    The alpha amount.

    Return Value

    A new Vec4 representing a color.

  • Given a Vec3 and a w component create a Vec4

    Declaration

    Swift

    public init(vec3: Vec3, w: Float = 0.0)

    Parameters

    vec3

    The vector to use for the first 3 components.

    w

    The w component.

    Return Value

    a new Vec4.