Skip to content

Vector4

Mtax edited this page Sep 5, 2026 · 3 revisions

Description

Constructs a Container for two x and y coordinate pairs.

It is a universal constructor containing two sets of values expressing two points on a two-dimensional plane, horizontal as x and vertical as y. This is the minimum information request to construct a rectangular shape in such space, which is the usual use of this constructor.

Vector2 is a similar constructor with only one set of such values.

Specification

Destruction
Elements
Garbage Collection
None

Properties

Name
Type
Default
Modifiable
x1
undefined
Yes
y1
undefined
Yes
x2
undefined
Yes
y2
undefined
Yes

Construction types

Name
Arguments
Argument note
Four numbers
x1 {real}
y1 {real}
x2 {real}
y2 {real}
One number for all values
value {real}
Number pair
first {real}
second {real}
First number will be set to x1 and y1.Second number will be set to x2 and y2.
From array
array {real[]}
Array positions will be applied depending on its size: 1: array[0] will be set to all values. 2: array[0] will be set to x1 and y1, array[1] will be set to
x2 and y2. 4+: array[0] will be set to x1, array[1] will be set to y1, array[2] will be set to x2, array[3] will be set to y2.
From Scale or Vector2
other {Scale|Vector2}
Vector2 pair
first {Vector2}
second {Vector2}
Empty
Constructor copy
other {Vector4}
Contents

Constructors
Container
Angle
Management
● isFunctional()
Getters
● equals()
● difference()
Setters
● set()
● modify()
Conversion
● toString()
Color2
Management
● isFunctional()
Getters
● equals()
● interpolate()
Setters
● reverse()
● set()
● setAll()
Conversion
● toString()
● toArray()
Color3
Management
● isFunctional()
Getters
● equals()
● interpolate()
Setters
● reverse()
● set()
● setAll()
Conversion
● toString()
● toArray()
Color4
Management
● isFunctional()
Getters
● equals()
● interpolate()
Setters
● reverse()
● set()
● setAll()
Conversion
● toString()
● toArray()
● split()
DateTime
Management
● isFunctional()
Getters
● compareDateTime()
● compareDate()
● compareTime()
● spanOfYears()
● spanOfMonths()
● spanOfWeeks()
● spanOfDays()
● spanOfHours()
● spanOfMinutes()
● spanOfSeconds()
● getDate()
● getTime()
● getDaysInYear()
● getDaysInMonth()
● getWeekOfYear()
● getDayOfYear()
● getHourOfYear()
● getMinuteOfYear()
● getSecondOfYear()
● getWeekday()
● isToday()
● isLeapYear()
Setters
● modify()
● modifyYears()
● modifyMonths()
● modifyWeeks()
● modifyDays()
● modifyHours()
● modifyMinutes()
● modifySeconds()
● setCurrent()
● setDateTime()
Conversion
● toString()
● toStringDate()
● toStringTime()
● toArray()
● toArrayDate()
● toArrayTime()
EulerAngle
Management
● isFunctional()
Setters
● set()
● modify()
Conversion
● toString()
● toArray()
Range
Management
● isFunctional()
Getters
● sum()
● difference()
● product()
● quotient()
● clamp()
● interpolate()
● percent()
● randomReal()
● randomInt()
● getMiddle()
● isBetween()
● isBoundary()
Conversion
● toString()
● toArray()
RangedValue
Management
● isFunctional()
Getters
● equals()
● percent()
● isBoundary()
● isMinimum()
● isMaximum()
Setters
● modify()
● modifyWrap()
● modifyBounce()
● interpolate()
● set()
● setMinimum()
● setMaximum()
● setOriginal()
● setMiddle()
Conversion
● toString()
Scale
Management
● isFunctional()
Getters
● contains()
● equals()
● sum()
● difference()
● product()
● quotient()
● getMinimum()
● getMaximum()
● getSign()
Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● grow()
● shrink()
● mirror()
● mirrorX()
● mirrorY()
● set()
● setAll()
Conversion
● toString()
● toArray()
TextAlign
Management
● isFunctional()
Getters
● equals()
● getMultiplier()
Setters
● mirror()
● mirrorX()
● mirrorY()
● setXLeft()
● setXCenter()
● setXRight()
● setYTop()
● setYMiddle()
● setYBottom()
Execution
● setActive()
Conversion
● toString()
● toArray()
Vector2
Management
● isFunctional()
Getters
● contains()
● equals()
● exceeds()
● subceeds()
● sum()
● difference()
● absoluteDifference()
● product()
● quotient()
● dotProduct()
● crossProduct()
● getAngle()
● getDistance()
● getMinimum()
● getMaximum()
● getMagnitude()
● getNormalized()
● getSign()
Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● grow()
● shrink()
● clamp()
● setMinimum()
● setMaximum()
● flip()
● mirror()
● set()
● setAll()
● setFloor()
● setRound()
● setCeil()
● setCursor()
Conversion
● toString()
● toArray()
Vector3
Management
● isFunctional()
Getters
● contains()
● equals()
● exceeds()
● subceeds()
● sum()
● difference()
● absoluteDifference()
● product()
● quotient()
● dotProduct()
● crossProduct()
● getDistance()
● getMinimum()
● getMaximum()
● getMagnitude()
● getNormalized()
● getSign()
Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● grow()
● shrink()
● mirror()
● set()
● setAll()
● setFloor()
● setRound()
● setCeil()
Conversion
● toString()
● toArray()
Vector4
Management
● isFunctional()
Getters
● contains()
● equals()
● exceeds()
● subceeds()
● sum()
● difference()
● absoluteDifference()
● product()
● quotient()
● dotProduct()
● interpolate()
● percent()
● getAngle()
● getDistance()
● getClosest()
● getMinimum()
● getMaximum()
● getMiddle()
● getMagnitude()
● getNormalized()
● getSign()
● isBetween()
● isDegenerate()
Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● clamp()
● setMinimum()
● setMaximum()
● grow()
● shrink()
● flip()
● mirror()
● mirrorX()
● mirrorY()
● sort()
● roundToBorder()
● set()
● setAll()
● setFloor()
● setRound()
● setCeil()
● setCursor()
● setBoundary()
Conversion
● toString()
● toArray()
● split()
● combine()
Data Structure
Grid
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● containsRegion()
● containsDisk()
● count()
● getValue()
● getCellCount()
● getRow()
● getColumn()
● getMinimum()
● getMinimumDisk()
● getMaximum()
● getMaximumDisk()
● getMean()
● getMeanDisk()
● getSum()
● getSumDisk()
● getValueLocation()
● getValueLocationDisk()
Setters
● setSize()
Execution
● forEach()
● set()
● setRegion()
● setDisk()
● setRegionCopied()
● add()
● addRegion()
● addDisk()
● addRegionCopied()
● multiply()
● multiplyRegion()
● multiplyDisk()
● multiplyRegionCopied()
● mirrorX()
● mirrorY()
● transpose()
● sort()
● shuffle()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
List
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getValue()
● getFirst()
● getLast()
● getFirstPosition()
● getPositions()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● set()
● replace()
● removePosition()
● removeValue()
● insert()
● sort()
● shuffle()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Map
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getValue()
● getAllValues()
● getAllKeys()
● getFirst()
● getLast()
● getPrevious()
● getNext()
● keyExists()
● valueIsBoundList()
● valueIsBoundMap()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● addBoundList()
● addBoundMap()
● set()
● replace()
● remove()
Conversion
● toString()
● toArray()
● fromArray()
● toStruct()
● fromStruct()
● toEncodedString()
● fromEncodedString()
● secureToFile()
● secureFromFile()
● secureFromBuffer()
PriorityQueue
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getFirst()
● getLast()
● getPriority()
● getFirstPriority()
● getLastPriority()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● setPriority()
● remove()
● removeFirst()
● removeLast()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Queue
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getFirst()
● getLast()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● remove()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Stack
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getFirst()
● getLast()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● remove()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Debug
ErrorReport
Management
● isFunctional()
Execution
● report()
Conversion
● toString()

ErrorReport.ReportData
Management
● isFunctional()
Getters
● equals()
● formatLocation()
● formatDetail()
● formatCallstack()
● formatTime()
Conversion
● toString()
Handler
ArrayParser
Management
● isFunctional()
● setParser()
● create()
● clear()
● copy()
● merge()
Getters
● contains()
● containsAll()
● containsCondition()
● equals()
● getValue()
● getUniqueValues()
● getSharedValues()
● getFirst()
● getLast()
● getFirstPosition()
● getLastPosition()
● getPositions()
● getPositionsCondition()
● getReduction()
● getColumn()
● getSize()
● isEmpty()
Setters
● setSize()
Execution
● forEach()
● add()
● addUnique()
● set()
● insert()
● removePosition()
● removeValue()
● sort()
Conversion
● toString()
AudioPlayer
Management
● isFunctional()
Execution
● play()
Conversion
● toString()
Callback
Management
● isFunctional()
● clear()
Getters
● prependArgument()
Setters
● set()
● setAll()
Execution
● execute()
Conversion
● toString()
● toArray()
SpriteRenderer
Management
● isFunctional()
Getters
● equals()
● getVertexLocation()
● getUV()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
StringParser
Management
● isFunctional()
● setParser()
Getters
● contains()
● containsAll()
● startsWith()
● endsWith()
● charEquals()
● charIsWhitespace()
● split()
● getFirst()
● getLast()
● getBetween()
● getByte()
● getByteLength()
● getChar()
● getOrd()
● getPart()
● getLetters()
● getDigits()
● getLettersAndDigits()
● getSubstringCount()
● getSubstringPosition()
● getSize()
● getPixelSize()
Setters
● remove()
● formatNumber()
● formatStruct()
● insert()
● duplicate()
● replace()
● reverse()
● trim()
● setByte()
● setLowercase()
● setUppercase()
● capitalize()
Execution
● forEach()
● displayOutput()
● displayMessageBox()
Conversion
● toString()
● toNumber()
● toArray()
● fromArray()
● toFile()
● fromFile()
● fromJSON()
SurfaceRenderer
Management
● isFunctional()
Execution
● render()
Conversion
● toString()
● toVertexBuffer()
TextRenderer
Management
● isFunctional()
Getters
● equals()
● getScaleMultiplier()
● getPixelSize()
● getBoundaryOffset()
Setters
● wrapText()
Execution
● render()
Conversion
● toString()
● toVertexBuffer()
Resource
Audio
Management
● isFunctional()
Getters
● isPlaying()
Setters
● setOffset()
Execution
● play()
Conversion
● toString()
Buffer
Management
● isFunctional()
● destroy()
● copy()
Getters
● getSeekPosition()
● getType()
● getAlignment()
● getPointer()
● getSize()
Setters
● setSeekPosition()
Execution
● write()
● fill()
● read()
● compress()
● decompress()
● getValue()
Conversion
● toString()
● toHashMD5()
● toHashSHA1()
● toHashCRC32()
● toEncodedString()
● fromEncodedString()
● secureFromMap()
● fromSurface()
● toFile()
● fromFile()
● fromFilePart()
Camera
Management
● isFunctional()
● destroy()
Execution
● applySettings()
● createOrtographicProjectionMatrix()
● createPerspectiveProjectionMatrix()
● createPerspectiveFieldOfViewProjectionMatrix()
● createViewMatrix()
Conversion
● toString()

Camera.OrtographicProjectionMatrix
Management
● isFunctional()
Execution
● build()
Conversion
● toString()
Camera.PerspectiveProjectionMatrix
Management
● isFunctional()
Execution
● build()
Conversion
● toString()
Camera.PerspectiveFieldOfViewProjectionMatrix
Management
● isFunctional()
Execution
● build()
Conversion
● toString()
Camera.ViewMatrix
Management
● isFunctional()
Execution
● build()
Conversion
● toString()
Font
Management
● isFunctional()
● destroy()
Getters
● equals()
● getTexture()
● getTexel()
● getUV()
● isActive()
Execution
● setActive()
Conversion
● toString()
Layer
Management
● isFunctional()
● destroy()
Getters
● hasInstance()
● getElements()
Setters
● setLocation()
● setSpeed()
● setVisible()
● setDepth()
● setShader()
● setFunctionDrawBegin()
● setFunctionDrawEnd()
Execution
● createBackground()
● createInstance()
● createTilemap()
● createSprite()
● createParticleSystem()
● destroyInstance()
● setInstancePause()
Conversion
● toString()

Layer.SpriteElement
Management
● isFunctional()
● changeParent()
● destroy()
Setters
● setSprite()
● setScale()
● setColor()
● setAlpha()
● setFrame()
● setSpeed()
Conversion
● toString()
Layer.BackgroundElement
Management
● isFunctional()
● changeParent()
● destroy()
Setters
● setSprite()
● setScale()
● setColor()
● setAlpha()
● setFrame()
● setSpeed()
● setStretch()
● setTiled()
● setVisible()
Conversion
● toString()
Layer.TilemapElement
Management
● isFunctional()
● destroy()
● clear()
● changeParent()
Getters
● getFrame()
● getMask()
● getTileInCell()
● getTileAtPoint()
● getCellAtPoint()
Setters
● setMask()
● setTileset()
● setSize()
Execution
● render()
● setTileInCell()
● setTileAtPoint()
Conversion
● toString()

Layer.TilemapElement.TileData
Management
● isFunctional()
● clear()
Getters
● getTilesetIndex()
● isEmpty()
● isMirroredX()
● isMirroredY()
● isRotated()
Setters
● setTilesetIndex()
● setMirrorX()
● setMirrorY()
● setRotate()
Execution
● render()
Conversion
● toString()
Layer.ParticleSystem
Management
● isFunctional()
● destroy()
● clear()
● changeParent()
Getters
● getParticleCount()
Setters
● setLocation()
● setDrawOrder()
● setAutomaticUpdate()
● setAutomaticRender()
Execution
● createEmitter()
● render()
● update()
Conversion
● toString()

Layer.ParticleSystem.ParticleEmitter
Management
● isFunctional()
● destroy()
● clear()
Setters
● setRegion()
● setStreamEnabled()
● setStreamCount()
Execution
● burst()
● stream()
Conversion
● toString()
ParticleType
Management
● isFunctional()
● destroy()
● clear()
Setters
● setShape()
● setSprite()
● setScale()
● setSize()
● setSpeed()
● setDirection()
● setAngle()
● setGravity()
● setLife()
● setColor()
● setColorMix()
● setColorRGB()
● setColorHSV()
● setBlend()
● setAlpha()
● setStep()
● setDeath()
Execution
● create()
● createShape()
Conversion
● toString()
Room
Management
● isFunctional()
● copy()
Getters
● isActive()
Setters
● setSize()
● setPersistent()
Execution
● createInstance()
● setActive()
Conversion
● toString()

Room.AddedInstance
Management
● isFunctional()
Conversion
● toString()
Shader
Management
● isFunctional()
Getters
● isActive()
Setters
● setUniformFloat()
● setUniformInt()
● setUniformMatrix()
● setUniformTexture()
● updateUniforms()
Execution
● setActive()
● createUniformData()
Conversion
● toString()

Shader.Uniform
Management
● isFunctional()
Execution
● update()
Conversion
● toString()
Sprite
Management
● isFunctional()
● destroy()
● replace()
● merge()
Getters
● getNineslice()
● getTexture()
● getUV()
● getTexel()
● getTextureTrim()
Setters
● setNineslice()
● setOrigin()
● setSpeed()
● setCollisionMask()
Execution
● render()
● renderTiled()
● renderPerspective()
● load()
● generateAlphaMap()
Conversion
● toString()
● toFile()
Surface
Management
● isFunctional()
● create()
● destroy()
● clear()
● copy()
Getters
● equals()
● getPixel()
● getTexture()
● getTexel()
● isActive()
Setters
● setSize()
Execution
● render()
● renderTiled()
● setActive()
Conversion
● toString()
● toFile()
● fromBuffer()
VertexBuffer
Management
● isFunctional()
● destroy()
● copy()
Getters
● getSize()
Setters
● setLocation2D()
● setLocation3D()
● setColor()
● setUV()
● setNormal()
Execution
● render()
● setActive()
● createPrimitiveRenderData()
● makeReadOnly()
Conversion
● toString()

VertexBuffer.PrimitiveRenderData
Management
● isFunctional()
● destroy()
Execution
● render()
Conversion
● toString()
VertexFormat
Management
● isFunctional()
● destroy()
Conversion
● toString()
Shape
Circle
Management
● isFunctional()
Getters
● equals()
● collision()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Cube
Management
● isFunctional()
Getters
● getVertexLocation()
● getUV()
● getNormal()
● getSpriteFrameOrder()
● getVertexSign()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toVertexBuffer()
Ellipse
Management
● isFunctional()
Getters
● equals()
● collision()
● containsPoint()
● cursorOver()
● cursorPressed()
● cursorHold()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
● getOutlineLocation()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Line
Management
● isFunctional()
Getters
● equals()
● collision()
● containsPoint()
● cursorOver()
● cursorPressed()
● cursorHold()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Plane
Management
● isFunctional()
Getters
● getVertexLocation()
● getUV()
● getNormal()
● getTransform()
● getVertexSign()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toVertexBuffer()
Point
Management
● isFunctional()
Getters
● equals()
● collision()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Rectangle
Management
● isFunctional()
Getters
● equals()
● collision()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
● getOutlineLocation()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
RoundRectangle
Management
● isFunctional()
Getters
● equals()
● containsPoint()
● cursorOver()
● cursorPressed()
● cursorHold()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
● getOutlineLocation()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Triangle
Management
● isFunctional()
Getters
● equals()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
● getOutlineLocation()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()

Clone this wiki locally