I’m building up to a new idiom for dealing with generic numeric types and traits, but this is the first step. I made it more general than I probably needed for my purposes, but it seemed like a good idea to just solve the whole problem given that I was going to do much of the work anyways.

Credit to the hereditary crate for inspiration on how to do it.

I’m very new at this software publishing thing, so lemme know if I messed something up.