Source Academy Modules
    Preparing search index...

    Variable r_ofConst

    r_of: (pt: Point) => number = CurveFunctions.r_of

    Retrieves the red component of a given Point.

    Type Declaration

      • (pt: Point): number
      • Parameters

        • pt: Point

          given point

        Returns number

        Red component of the Point as a value between [0,255]

    const point = make_color_point(1, 2, 3, 50, 100, 150);
    r_of(point); // Returns 50