Catalog/geometry-vector-rotate

Geometry

Rotate vector 2D/3D API

Rotate a 2D vector about the origin or a 3D vector about an arbitrary axis (Rodrigues' formula). Answers 'where does this vector point after rotating by an angle?', 'how do I rotate about an axis?'.

Price$0.02per request
MethodPOST
Route/v1/geometry/vector-rotate
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
rotationvectorrodriguesaxis2d3dtransform
API URLhttps://x402.hexl.dev/v1/geometry/vector-rotate
Integration docs
Example request
{
  "vector": [
    1,
    0
  ],
  "angleDeg": 90
}
Example response
{
  "rotated": [
    0,
    1
  ],
  "angleDeg": 90,
  "method": "2D rotation"
}
Input schema
{
  "type": "object",
  "required": [
    "vector",
    "angleDeg"
  ],
  "properties": {
    "vector": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "examples": [
        [
          1,
          0
        ]
      ]
    },
    "angleDeg": {
      "type": "number",
      "examples": [
        90
      ]
    },
    "axis": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "required for 3D vectors",
      "examples": [
        [
          0,
          0,
          1
        ]
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}