-
Notifications
You must be signed in to change notification settings - Fork 0
RulVec
RUL supports 2 and 3-dimensional vectors. Depending on which framework you are using this library with, the names of functions and types of parameters may differ slightly(ie. if you are using this library with Unity, replace "Vec2" with Vector2 .
lowerBoundX : Lower limit for the x-component
lowerBoundY : Lower limit for the y-component
upperBoundX : Upper limit for the x-component
upperBoundY : Upper limit for the y-component
Returns a random 2-dimensional vector within the specified range
pointA : One end of the line that includes the random vector
pointB : The other end of the line that includes the random vector
Returns a random 2-dimensional vector that lies on the line connecting the given points.
baseVector : The vector that will be used as a base for the new random one
maxAngle : The greatest possible angle(in radians) between the base vector and the rotated random vector
Returns a randomly rotated version of the given base vector
rectPos : The position of the upper left corner of the rectangle
width : The width of the rectangle
height : The height of the rectangle
Returns a random 2-dimensional vector that lies in the given rectangle
Returns a random 2-dimensional vector with the length 1
circleRadius : The radius of the circle containing the random vector
Returns a random 2-dimensional vector that lies in the circle with the specified radius
Returns a 2-dimensional vector that points up, down, left or right
Most functions in this class work exactly the same way in 3-dimensional space.