Skip to content

Commit

Permalink
same for those
Browse files Browse the repository at this point in the history
  • Loading branch information
obiot committed Aug 6, 2024
1 parent e221586 commit fd8eeb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/melonjs/src/math/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class Color {
* @param value - The red component [0 .. 255].
*/
set r(value) {
this.glArray[0] = clamp(~~value, 0, 255) / 255.0;
this.glArray[0] = clamp(value, 0, 255) / 255.0;
}

/**
Expand All @@ -264,7 +264,7 @@ export class Color {
* @param value - The green component [0 .. 255].
*/
set g(value) {
this.glArray[1] = clamp(~~value, 0, 255) / 255.0;
this.glArray[1] = clamp(value, 0, 255) / 255.0;
}

/**
Expand All @@ -280,7 +280,7 @@ export class Color {
* @param value - The blue component [0 .. 255].
*/
set b(value) {
this.glArray[2] = clamp(~~value, 0, 255) / 255.0;
this.glArray[2] = clamp(value, 0, 255) / 255.0;
}

/**
Expand All @@ -296,7 +296,7 @@ export class Color {
* @param value - The alpha component [0.0 .. 1.0].
*/
set alpha(value) {
this.glArray[3] = clamp(+value, 0, 1.0);
this.glArray[3] = clamp(value, 0, 1.0);
}

/**
Expand Down

0 comments on commit fd8eeb0

Please sign in to comment.