From: lkcl Date: Mon, 16 Sep 2019 03:06:49 +0000 (+0100) Subject: (no commit message) X-Git-Tag: convert-csv-opcode-to-binary~4051 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3b349c24c0591f9cb91bfa378973cbed9ce9734;p=libreriscv.git --- diff --git a/vector_ops.mdwn b/vector_ops.mdwn index 2dfda08a8..bdb3c9284 100644 --- a/vector_ops.mdwn +++ b/vector_ops.mdwn @@ -6,10 +6,26 @@ Normally in SV all operations are scalar and independent. In this extension, th ## Vector cross product +Result is the cross product of x and y, i.e., the resulting components are, in order: + + x[1] * y[2] - y[1] * x[2] + x[2] * y[0] - y[2] * x[0] + x[0] * y[1] - y[0] * x[1] + +All the operands must be vectors of 3 components of a floating-point type. + ## Vector dot product ## Vector length +The scalar length of a vector + + sqrt(x[0]^2 + x[1]^2 + ...). + +## Vector distance + +The scalar distance between two vectors. Subtracts one vector from the other and returns length + ## Vector LERP ## Vector SLERP