Skip to content

Converting from num::Real and Scalar types to f32/f64 #341

Answered by Ogeon
okaneco asked this question in Q&A
Discussion options

You must be logged in to vote

I see, sorry for the headaches. First, let me just answer your last question: prefer num-traits over palette::num as much as you possibly can for now. It's much more complete and long-term stable, and also more integrated in the general ecosystem. palette::num should ideally be a separate crate but I didn't want to take that step without trying it out in practice first (and I'm not sure I should be the one maintaining it, honestly).

For the case with Lab (I found your PR and had a look), since you effectively required Lab<Wp, f32> before, you should be able to continue doing that and not make it generic over the component type for now. You shouldn't have to introduce new requirements in t…

Replies: 1 comment 18 replies

Comment options

You must be logged in to vote
18 replies
@Ogeon
Comment options

@Ogeon
Comment options

@okaneco
Comment options

@Ogeon
Comment options

Answer selected by okaneco
@okaneco
Comment options

@okaneco
Comment options

@Ogeon
Comment options

@okaneco
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants