The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
¿Posible bug ?
#4
For my part, I think the simplest solution would probably be:

Code:
LET valor = sgn (sum=3)

I think that would work? 0 for 0. And 1 for any other positive value - and less calculation than dividing by 255 (and given there's no guarantee that TRUE=255, possibly safer?)



Creo que la solución más simple probablemente sería:

Code:
LET valor = sgn (sum=3)

Creo que eso funcionaria? 0 para 0. Y 1 para cualquier otro valor positivo, y menos cálculo que dividir por 255 (y dado que no hay garantía de que TRUE = 255, ¿sea más seguro?)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)