Line2D: Difference between revisions

From Crumbled World Wiki
(Created page with "{{:Line2DExampleCode}} ==Members== {| class="wikitable" !|type !|variable !|description |- |Vec2 |startPos | |- |Vec2 |endPos | |- |} ==Constructor== {| class="wikitable" !|function !|description |- |Line2D(Vec2 startPos, Vec2 endPos) | |- |Line2D(Vec2 startPos, Vec2 atVec, float length) | |- |Line2D() | |- |} ==Functions== {| class="wikitable" !|return !|function !|description |- |float |length() |Returns the line length....")
 
(No difference)

Latest revision as of 13:36, 5 July 2025

Line2DExampleCode

Members

type variable description
Vec2 startPos
Vec2 endPos

Constructor

function description
Line2D(Vec2 startPos, Vec2 endPos)
Line2D(Vec2 startPos, Vec2 atVec, float length)
Line2D()

Functions

return function description
float length() Returns the line length.
float getDist() Returns the line length^2.
Vec2 getCenterPos() Returns the line center position.
setLine(Vec3 startPos, Vec3 endPos) set the line.
setLine(Line2D line) set the line.