Never used ArraySegments in C#? They exist since version 2.0
Abtracting over float/doubles is called generics.