/** * Linear interpolate the vector to x,y,z values * @param x the x component to lerp to * @param y the y component to lerp to * @param z the z component to lerp to */ public void lerp(float x, float y, float z, float amt) { this.x = PApplet.lerp(this.x,x,amt); this.y = PApplet.lerp(this.y,y,amt); this.z = PApplet.lerp(this.z,z,amt); }
/** * Linear interpolate the vector to x,y,z values * @param x the x component to lerp to * @param y the y component to lerp to * @param z the z component to lerp to */ public PVector lerp(float x, float y, float z, float amt) { this.x = PApplet.lerp(this.x, x, amt); this.y = PApplet.lerp(this.y, y, amt); this.z = PApplet.lerp(this.z, z, amt); return this; }
/** * ( begin auto-generated from PVector_rotate.xml ) * * Linear interpolate the vector to another vector * * ( end auto-generated ) * * @webref pvector:method * @usage web_application * @brief Linear interpolate the vector to another vector * @param v the vector to lerp to * @param amt The amount of interpolation; some value between 0.0 (old vector) and 1.0 (new vector). 0.1 is very near the new vector. 0.5 is halfway in between. */ public void lerp(PVector v, float amt) { x = PApplet.lerp(x,v.x,amt); y = PApplet.lerp(y,v.y,amt); z = PApplet.lerp(z,v.z,amt); }
/** * ( begin auto-generated from PVector_rotate.xml ) * * Linear interpolate the vector to another vector * * ( end auto-generated ) * * @webref pvector:method * @usage web_application * @brief Linear interpolate the vector to another vector * @param v the vector to lerp to * @param amt The amount of interpolation; some value between 0.0 (old vector) and 1.0 (new vector). 0.1 is very near the old vector; 0.5 is halfway in between. * @see PApplet#lerp(float, float, float) */ public PVector lerp(PVector v, float amt) { x = PApplet.lerp(x, v.x, amt); y = PApplet.lerp(y, v.y, amt); z = PApplet.lerp(z, v.z, amt); return this; }
for (int j = prev; j <= last; j++) { float btwn = PApplet.norm(j, prev, last); interp[j][0] = (int) PApplet.lerp((c0 >> 16) & 0xff, (c1 >> 16) & 0xff, btwn); interp[j][1] = (int) PApplet.lerp((c0 >> 8) & 0xff, (c1 >> 8) & 0xff, btwn); interp[j][2] = (int) PApplet.lerp(c0 & 0xff, c1 & 0xff, btwn); interp[j][3] = (int) (PApplet.lerp((c0 >> 24) & 0xff, (c1 >> 24) & 0xff, btwn) * opacity);
interp[j][0] = (int) PApplet.lerp((c0 >> 16) & 0xff, (c1 >> 16) & 0xff, btwn); interp[j][1] = (int) PApplet.lerp((c0 >> 8) & 0xff, (c1 >> 8) & 0xff, btwn); interp[j][2] = (int) PApplet.lerp(c0 & 0xff, c1 & 0xff, btwn); interp[j][3] = (int) (PApplet.lerp((c0 >> 24) & 0xff, (c1 >> 24) & 0xff, btwn) * opacity);