Log InSign Up
Docs
  • Zoo Design Studio
  • Zoo Developer Tools
  • KCL Book
  • KCL Samples
  • KCL Language Reference
  • KCL Standard Library
    • Consts
    • Modules
    • Types
    • Functions
      • appearance::hexString
      • appearance::rgb
      • concat
      • count
      • map
      • pop
      • push
      • reduce
      • assert
      • assertIs
      • clone
      • helix
      • abs
      • acos
      • asin
      • atan
      • atan2
      • ceil
      • cos
      • floor
      • legAngX
      • legAngY
      • legLen
      • ln
      • log
      • log10
      • log2
      • max
      • min
      • polar
      • pow
      • rem
      • round
      • sin
      • sqrt
      • tan
      • offsetPlane
      • angledLine
      • angledLineThatIntersects
      • arc
      • bezierCurve
      • circle
      • circleThreePoint
      • close
      • conic
      • ellipse
      • elliptic
      • ellipticPoint
      • extrude
      • getCommonEdge
      • getNextAdjacentEdge
      • getOppositeEdge
      • getPreviousAdjacentEdge
      • hyperbolic
      • hyperbolicPoint
      • involuteCircular
      • lastSegX
      • lastSegY
      • line
      • loft
      • parabolic
      • parabolicPoint
      • patternCircular2d
      • patternLinear2d
      • patternTransform2d
      • planeOf
      • polygon
      • profileStart
      • profileStartX
      • profileStartY
      • rectangle
      • revolve
      • segAng
      • segEnd
      • segEndX
      • segEndY
      • segLen
      • segStart
      • segStartX
      • segStartY
      • startProfile
      • startSketchOn
      • subtract2d
      • sweep
      • tangentToEnd
      • tangentialArc
      • xLine
      • yLine
      • appearance
      • chamfer
      • fillet
      • hollow
      • intersect
      • patternCircular3d
      • patternLinear3d
      • patternTransform
      • shell
      • subtract
      • union
      • mirror2d
      • rotate
      • scale
      • translate
      • units::toCentimeters
      • units::toDegrees
      • units::toFeet
      • units::toInches
      • units::toMeters
      • units::toMillimeters
      • units::toRadians
      • units::toYards
      • vector::add
      • vector::cross
      • vector::div
      • vector::dot
      • vector::magnitude
      • vector::mul
      • vector::normalize
      • vector::sub
  • Glossary
  • FAQ
  • Enterprise
kcl-std → functions → vector::dot

vector::dotFunction in std::vector

Find the dot product of two points or vectors of any dimension.

vector::dot(
  @u: [number],
  v: [number],
): number

Arguments

NameTypeDescriptionRequired
u[number]Yes
v[number]Yes

Returns

number - A number.

Examples

u = [1, 2, 3]
v = [4, -5, 6]
dotprod = vector::dot(u, v)
assert(dotprod, isEqualTo = 12)

Rendered example of vector::dot 0

Found a typo?
Zoo

8701 Aviation Blvd

Inglewood, California 90301

    Product
  • Zoo Design Studio
  • Text-to-CAD
  • Download App
  • Release Notes
    Company
  • Careers
  • Research
  • Blog
  • Contact Sales
    Pricing
  • Zoo Design Pricing
  • API Pricing
    Resources
  • Tutorials
  • Developers
  • Support
  • Terms & Conditions
  • Privacy Policy
  • Security

Copyright © 2025 ZOO CORPORATION All rights reserved.