Replies: 8 comments 34 replies
-
Well it shouldn't be |
Beta Was this translation helpful? Give feedback.
-
Yeah right, the point is if we do want to have/makes sense matrices with boolean and unsigned |
Beta Was this translation helpful? Give feedback.
-
Yeah, Boolean probably doesn't make sense. I think there are Szenarios in which unsigned matrices would be useful, but I don't know if that has that much use cases that it's worth it. Especially when we could replace all the subclasses with typealiases if we would have only matrices where T extends Number |
Beta Was this translation helpful? Give feedback.
-
Also, what about opening up vectors and matrices? One test on the original glm is about extending |
Beta Was this translation helpful? Give feedback.
-
Also super interesting regarding unsigned extending |
Beta Was this translation helpful? Give feedback.
-
Also we should think about if we want to add KDoc to the generated Functions and Classes |
Beta Was this translation helpful? Give feedback.
-
And another thing to think about is if we want to keep the system with a |
Beta Was this translation helpful? Give feedback.
-
I never saw unsigned matrices so far, so unless we are proven otherwise I'd say let's merge that and continue Also, I'm porting directly from the native library Edit: shall we keep the constructor for building matrices by diagonal? That is, ie constructor(x: Number, y: Number) : this(x, y, 1)
constructor(x: Number, y: Number, z: Number) : this(
x, 0, 0,
0, y, 0,
0, 0, z) Edit2: maybe it's better to avoid any operation on generic and write down every specific implementation, such as: |
Beta Was this translation helpful? Give feedback.
-
@ArcheCraft
So, about matrices, I was wondering if switching to something like
abstract class Mat2T<V, N> where N : Number, V : Vec2T<out Number>
This way we might have the component accesses down and having to implement, in the extending classes, only the
abstract operator fun get(index: Int): V
where the implementing matrix class can call the appropriate vector constructor..Beta Was this translation helpful? Give feedback.
All reactions