Una función que hice como alternativa a Abs(); de System.pas

Código: Seleccionar todo

function AbsoluteValue(X:Real):Real;
const
  ZeroValue = 0.0;
begin
  if X < ZeroValue  then
    Result := -X (* Es igual a X * (-1) *)
  else if X > ZeroValue then
    Result := X
  else
    Result := ZeroValue;
end;
Más Información: [Enlace externo eliminado para invitados]
Imagen

Imagen

Imagen

"The only thing they can't take from us are our minds."
Responder

Volver a “Fuentes”