4 ms·
I typically use "_fraction" to indicate this in floating point variable names, along with a comment explicitly mentioning the range from 0 to 1 somewhere. Seems
by sgtnoodle 6y ago
I typically use "_fraction" to indicate this in floating point variable names, along with a comment explicitly mentioning the range from 0 to 1 somewhere. Seems to minimize confusion pretty well.
- panic 6y agoI’ve also seen “fraction” used for this concept in Apple/NeXT APIs. E.g., “-[NSImage drawInRect:fromRect:operation:fraction:]” and “-[UIViewPropertyAnimator fractionComplete]”.