Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

767
Vistas
Solve "integer division in floating-point context" warning

How does one solve the "integer division in floating-point context" warning, in this line of code:

int fps = 60;
double timePerTick = 1000000000 / fps;
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

When dividing two ints, you'll be using integer division, and only then promoting the result to a double, losing all the precision after the decimal point. You can use floating point precision by using a double literal instead:

double timePerTick = 1000000000.0 / fps;
// Here -----------------------^
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda