Tag Info

New answers tagged

5

Although it's usually good practice to accept as abstract of arguments as possible, in Scala you generally want to avoid directly using any types with [Repr] parameters. They are mostly there for the convenience of the standard library implementors. That's especially true for StringLike, which is primarily intended to augment a Java String to be able to ...


2

Don't store it in a wrapped class in the first place. Just create a transformation function from the data structure you have to the one you need: def createFlippedBuffer(vertex_positions: Positions) : FloatBuffer = { val vertBuffer: FloatBuffer = createFloatBuffer(vertex_positions.length) vertBuffer.put(vertex_positions) vertBuffer.flip() ...



Top 50 recent answers are included