public static int TVECTOR_LENGTH( Object o )
{
if (o is double[])
return ((double[])o).Length;
if (o is int[])
return ((int[])o).Length;
if (o is long[])
return ((long[])o).Length;
if (o is bool[])
return ((bool[])o).Length;
if (o is Object[])
return ((Object[])o).Length;
fail( "tvector_length", "Unknown tvec object", o );
return 0;
}