/** * Creates a new Color3 with values linearly interpolated of "amount" between the start Color3 and the end Color3. */ public static BabylonColor3 Lerp(BabylonColor3 start, BabylonColor3 end, float amount) { var r = start.r + ((end.r - start.r) * amount); var g = start.g + ((end.g - start.g) * amount); var b = start.b + ((end.b - start.b) * amount); return(new BabylonColor3(r, g, b)); }
/** * Returns a new Color3 set with the subtracted values of the passed one from the current Color3. */ public BabylonColor3 subtract(BabylonColor3 right) { return(new BabylonColor3(this.r - right.r, this.g - right.g, this.b - right.b)); }