<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKVector4CrossProduct(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:@F@GLKVector4CrossProduct"
  },
  "title" : "GLKVector4CrossProduct(_:_:)"
}
-->

# GLKVector4CrossProduct(_:_:)

Returns the cross product of two vectors.

```
func GLKVector4CrossProduct(_ vectorLeft: GLKVector4, _ vectorRight: GLKVector4) -> GLKVector4
```

## Parameters

`vectorLeft`

The first vector.

`vectorRight`

The second vector.

## Return Value

A new vector.

## Discussion

The calculation is performed by taking the `[x,y,z]` components of the two source vectors and computing the cross product of those two vectors. The `w` component of the result vector is `0.0`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)