processing4 icon indicating copy to clipboard operation
processing4 copied to clipboard

PVector's setHeading() isn't highlighted, or in the reference.

Open processing-bot opened this issue 3 years ago • 13 comments

Created by: ExpandingS

Description

The method setHeading isn't highlighted like other methods in PVector. It also isn't in the reference (But this may be an issue for processing-docs?).

Expected Behavior

setHeading appears with that same blue colour.

Current Behavior

Image

Steps to Reproduce

  1. Paste the following code:
void setup() {
  PVector p = new PVector(5, 5);
  
  p.setMag(2);
  p.setHeading(3);
}
  1. Observe the highlighting

Your Environment

  • Processing version: 4.0b7, latest from git
  • Operating System and OS version: Windows 10
  • Other information:

Possible Causes / Solutions

I've tried adding annotations as there aren't currently any, like:

  /**
   *
   * Set the heading of this vector to the value used for the <b>len</b> parameter.
   *
   *
   * @webref pvector:method
   * @usage web_application
   * @param angle the new heading for this vector
   * @webBrief  Set the heading of the vector
   */
  public PVector setHeading(float angle) {
    float m = mag();
    x = (float) (m * Math.cos(angle));
    y = (float) (m * Math.sin(angle));
    return this;
  }

However it didn't seem to change anything.

Other

Added in this issue

processing-bot avatar Apr 21 '22 13:04 processing-bot

I've had some more time to look at it, I see that the highlighting comes from keywords.txt, which gets updated periodically. So just adding this doclet be sufficient?

ExpandingS avatar Apr 22 '22 14:04 ExpandingS