views:

55

answers:

3

I am writing a class for handling decimal numbers, e.g. "123.456". I want one function for extracting the digits before the decimal point (123), and one function to extract the digits after the decimal point (0.456). My question is not how to do the programming, but how to name the functions? Do you have any better idea than digits_before_point() and digits_after_point()?

+1  A: 

How about integral_part and decimal_part?

Anon.
+2  A: 

integralPart() and decimalPart() or integers() and decimals()

dfa
A: 

integer_part() and fraction_part()

Qwerty