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::normalize

vector::normalizeFunction in std::vector

Normalize a vector (with any number of dimensions)

vector::normalize(@v: [number]): [number]

Arguments

NameTypeDescriptionRequired
v[number]Yes

Returns

[number]

Examples

v = [3, 4]
normed = vector::normalize(v)
assert(normed[0], isEqualTo = 0.6)
assert(normed[1], isEqualTo = 0.8)

Rendered example of vector::normalize 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.