Function next_px_step

  • Advances a step in a given direction.

    Parameters

    • current_x: number

      the current x pos in px.

    • current_y: number

      the current x pos in px.

    • distance: number

      the step distance.

    • angle_direction: number

      the angle of the new direction.

    Returns {
        x: number;
        y: number;
    }

    Returns the new x and y position.

    • x: number
    • y: number