Skip to content

Commit

Permalink
Fixed floating point display of parameters in the GUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
moorepants committed Jul 9, 2024
1 parent 61849a9 commit 0b497ca
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions yeadon/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@

from numpy import deg2rad, rad2deg

from traits.api import HasTraits, Range, Instance, \
on_trait_change, Float, Property, File, Bool, Button
from traitsui.api import \
View, Item, VSplit, VGroup, HSplit, HGroup, Group, Label
from traits.api import (HasTraits, Range, Instance, on_trait_change, Float,
Property, File, Bool, Button)
from traitsui.api import (View, Item, VSplit, VGroup, HSplit, HGroup, Group,
Label)

from mayavi.core.ui.api import MayaviScene, MlabSceneModel, SceneEditor

from .human import Human

sliders = Human.CFGnames


def format_func(value):
return '{:1.3}'.format(value)
return '{:1.3f}'.format(value)


class YeadonGUI(HasTraits):
"""A GUI for the yeadon module, implemented using the traits package."""
Expand Down

0 comments on commit 0b497ca

Please sign in to comment.