@@ -2343,84 +2343,120 @@ class Vector {
23432343 * @chainable
23442344 *
23452345 * @example
2346- * // META:norender
23472346 * function setup() {
2347+ * createCanvas(100, 100);
2348+ *
2349+ * background(200);
2350+ *
23482351 * // Create a p5.Vector object.
23492352 * let v0 = createVector(1, 1, 1);
23502353 * let v1 = createVector(3, 3, 3);
23512354 *
23522355 * // Interpolate.
23532356 * v0.lerp(v1, 0.5);
23542357 *
2355- * // Prints "p5.Vector Object : [2, 2, 2]" to the console.
2356- * print(v0.toString());
2358+ * // Display the result.
2359+ * textAlign(CENTER, CENTER);
2360+ * text(v0.toString(), 0, 0, width, height);
2361+ *
2362+ * describe('The text "p5.Vector Object : [2, 2, 2]" written on a gray square.');
23572363 * }
23582364 *
23592365 * @example
2360- * // META:norender
23612366 * function setup() {
2367+ * createCanvas(100, 100);
2368+ *
2369+ * background(200);
2370+ *
23622371 * // Create a p5.Vector object.
23632372 * let v = createVector(1, 1);
23642373 *
23652374 * // Interpolate with numbers. The last argument is the amount.
23662375 * v.lerp(3, 3, 0.5);
23672376 *
2368- * // Prints "p5.Vector Object : [2, 2]" to the console.
2369- * print(v.toString());
2377+ * // Display the result.
2378+ * textAlign(CENTER, CENTER);
2379+ * text(v.toString(), 0, 0, width, height);
2380+ *
2381+ * describe('The text "p5.Vector Object : [2, 2]" written on a gray square.');
23702382 * }
23712383 *
23722384 * @example
2373- * // META:norender
23742385 * function setup() {
2386+ * createCanvas(100, 100);
2387+ *
2388+ * background(200);
2389+ *
23752390 * // Create a p5.Vector object.
23762391 * let v = createVector(1, 1, 1);
23772392 *
23782393 * // Interpolate with an array.
23792394 * v.lerp([3, 3, 3], 0.5);
23802395 *
2381- * // Prints "p5.Vector Object : [2, 2, 2]" to the console.
2382- * print(v.toString());
2396+ * // Display the result.
2397+ * textAlign(CENTER, CENTER);
2398+ * text(v.toString(), 0, 0, width, height);
2399+ *
2400+ * describe('The text "p5.Vector Object : [2, 2, 2]" written on a gray square.');
23832401 * }
23842402 *
23852403 * @example
2386- * // META:norender
23872404 * function setup() {
2405+ * createCanvas(100, 100);
2406+ *
2407+ * background(200);
2408+ *
23882409 * // Create a p5.Vector object.
23892410 * let v = createVector(1, 1, 1);
23902411 *
23912412 * // Interpolate.
23922413 * v.lerp(3, 3, 3, 0.5);
23932414 *
2394- * // Prints "p5.Vector Object : [2, 2, 2]" to the console.
2395- * print(v.toString());
2415+ * // Display the result.
2416+ * textAlign(CENTER, CENTER);
2417+ * text(v.toString(), 0, 0, width, height);
2418+ *
2419+ * describe('The text "p5.Vector Object : [2, 2, 2]" written on a gray square.');
23962420 * }
23972421 *
23982422 * @example
2399- * // META:norender
24002423 * function setup() {
2424+ * createCanvas(100, 100);
2425+ *
2426+ * background(200);
2427+ *
24012428 * // Create p5.Vector objects.
24022429 * let v0 = createVector(1, 1, 1);
24032430 * let v1 = createVector(3, 3, 3);
24042431 *
24052432 * // Interpolate.
24062433 * let v2 = p5.Vector.lerp(v0, v1, 0.5);
24072434 *
2408- * // Prints "p5.Vector Object : [2, 2, 2]" to the console.
2409- * print(v2.toString());
2435+ * // Display the result.
2436+ * textAlign(CENTER, CENTER);
2437+ * text(v2.toString(), 0, 0, width, height);
2438+ *
2439+ * describe('The text "p5.Vector Object : [2, 2, 2]" written on a gray square.');
24102440 * }
24112441 *
24122442 * @example
2413- * // META:norender
24142443 * function setup() {
2444+ * createCanvas(100, 100);
2445+ *
2446+ * background(200);
2447+ *
24152448 * // Create p5.Vector objects.
24162449 * let v0 = createVector(0, 1, 0, 1);
24172450 * let v1 = createVector(1, 0, 1, 0);
24182451 *
24192452 * // Interpolate.
24202453 * v0.lerp(v1, 0.5);
24212454 *
2422- * // Prints "p5.Vector Object : [0.5, 0.5, 0.5, 0.5]" to the console.
2423- * print(v0.toString());
2455+ * // Display the result.
2456+ * textAlign(CENTER, CENTER);
2457+ * text(v0.toString(), 0, 0, width, height);
2458+ *
2459+ * describe('The text "p5.Vector Object : [0.5, 0.5, 0.5, 0.5]" written on a gray square.');
24242460 * }
24252461 *
24262462 * @example
0 commit comments