Closed samreid closed 3 months ago
B, Bx, and By are all scalars, so the vector notation was incorrect in the Java version. @samreid Does this updated doc clarify?
// Dynamic labels. The Java version showed a line over 'B' for these labels, presumably indicating 'vector'.
// Using that vector notation was incorrect, because the values we are showing here are all scalars.
// See for example https://en.wikipedia.org/wiki/Magnetic_flux.
const stringBLabelProperty = new DerivedStringProperty( [ BStringProperty ], B => `${B}` );
const stringBxLabelProperty = new DerivedStringProperty( [ BStringProperty, xStringProperty ], ( B, x ) => `${B}<sub>${x}</sub>` );
const stringByLabelProperty = new DerivedStringProperty( [ BStringProperty, yStringProperty ], ( B, y ) => `${B}<sub>${y}</sub>` );
Looks good, thanks. Closing.
During code review #103, we observed this code in FieldMeterNode.ts
Here is a picture of the line over the B in the Java:
It appears the line over the B is meant to indicate it is a vector, like so:
In the wikipedia link, the authors use an alternate strategy for showing that it is a vector, which is to use a boldface font, like so:
Note in this image, B is a vector and B is a scalar.