Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

757
Views
Resolver la advertencia de "división de enteros en contexto de coma flotante"

¿Cómo se resuelve la advertencia de "división de enteros en contexto de punto flotante", en esta línea de código:

 int fps = 60; double timePerTick = 1000000000 / fps;
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Al dividir dos int s, usará la división de enteros, y solo entonces promoverá el resultado a un doble, perdiendo toda la precisión después del punto decimal. Puede usar precisión de punto flotante usando un double literal en su lugar:

 double timePerTick = 1000000000.0 / fps; // Here -----------------------^
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!