Re: Posix(?) on numeric entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for replies.

Now I have:

gdouble value = 4.1;
gchar buffer[G_ASCII_DTOSTR_BUF_SIZE];

gtk_entry_set_text (GTK_ENTRY (value_entry), \
      g_ascii_dtostr(buffer, G_ASCII_DTOSTR_BUF_SIZE, value));


but on output I got for value -> 4.0999999999999996

How can I "round" value? Or g_ascii_formatd(...) is more appropriate?

Giulio
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Personalizza il tuo cellulare con un semplice sms, clicca qui
* 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3115&d=15-2
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux