See Vector2Base.dotProduct.
double Vector2DotProduct(Vector2StructType v1, Vector2StructType v2) => v1.dotProduct(v2);