[DEBUTANT] soustraction en javascript ?
Salut,
La question peut paraitre con mais j'ai essaye
Code:
1 2
|
this.randomByte = parseInt(this.rng.nextInt(255)) - parseInt("128") |
et aussi :
Code:
1 2
|
this.randomByte = parseInt(this.rng.nextInt(255)) - 128 |
et aussi :
Code:
1 2
|
this.randomByte = parseInt(this.rng.nextInt(255)) + (- 128) |
et aussi :
Code:
1 2
|
this.randomByte = -128 + parseInt(this.rng.nextInt(255)) |
et aussi :
Code:
1 2 3
|
this.randomByte =parseInt(this.rng.nextInt(255))
this.randomByte-=128 |
Absolument rien de tout ca ne marche !
parseInt(this.rng.nextInt(255)) retoiurne une valeur int de 0 a 255
quelau'un a une idee ?