Module Expr Str Import alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr If CompareEq Call AttributeLoad NameLoad attr NameLoad Str body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return UnaryOpNot Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr Str NameLoad Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr Str NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr Str NameLoad Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A Kraken - maths.vec2 module.

Classes:
Vec2 -- Vector 2 object.
 N/A math kraken.core.kraken_system ks math_object MathObject Vec2 N/A MathObject N/A N/A Vector 2 object. __init__ N/A N/A self x y N/A 0.0 0.0 N/A N/A Initializes x, y values for Vec2 object. N/A N/A N/A N/A super Vec2 self __init__ N/A N/A N/A N/A ks getRTValTypeName x Vec2 N/A N/A N/A self _rtval x N/A N/A N/A self _rtval N/A N/A ks rtVal Vec2 N/A N/A isinstance x Vec2 N/A N/A N/A N/A self set x N/A x x y N/A x y N/A N/A N/A N/A self set x x y y N/A __str__ N/A N/A self N/A N/A N/A String representation of the Vec2 object.

        Returns:
            str: String representation of the Vec2 object. N/A N/A N/A N/A N/A Vec2( N/A str N/A self x , N/A str N/A self y ) N/A x N/A N/A self N/A N/A N/A Gets x value of this vector.

        Returns:
            float: X value of this vector.

         N/A N/A N/A N/A N/A self _rtval x getSimpleType N/A property x N/A N/A self value N/A N/A N/A Sets x value from the input value.

        Args:
            value (float): Value to set the x property as.

        Returns:
            bool: True if successful.

         N/A N/A N/A self _rtval x N/A N/A ks rtVal Scalar value N/A True N/A N/A x setter y N/A N/A self N/A N/A N/A Gets y value of this vector.

        Returns:
            float: Y value of this vector.

         N/A N/A N/A N/A N/A self _rtval y getSimpleType N/A property y N/A N/A self value N/A N/A N/A Sets y value from the input value.

        Args:
            value (float): Value to set the y property as.

        Returns:
            bool: True if successful.

         N/A N/A N/A self _rtval y N/A N/A ks rtVal Scalar value N/A True N/A N/A y setter __eq__ N/A N/A self other N/A N/A N/A N/A N/A self equal other N/A __ne__ N/A N/A self other N/A N/A N/A N/A N/A N/A self equal other N/A __add__ N/A N/A self other N/A N/A N/A N/A N/A self add other N/A __sub__ N/A N/A self other N/A N/A N/A N/A N/A self subtract other N/A __mul__ N/A N/A self other N/A N/A N/A N/A N/A self multiply other N/A __div__ N/A N/A self other N/A N/A N/A N/A N/A self divide other N/A clone N/A N/A self N/A N/A N/A Returns a clone of the Vec2.

        Returns:
            Vec2: The cloned Vec2

         N/A vec2 N/A Vec2 N/A N/A vec2 x N/A self x N/A N/A vec2 y N/A self y N/A vec2 N/A set N/A N/A self x y N/A N/A N/A Sets the x and y value from the input values.

        Args:
            x (float): Value to set the x property as.
            y (float): Value to set the x property as.

        Returns:
            bool: True if successful.

         N/A N/A N/A N/A self _rtval set N/A N/A ks rtVal Scalar x N/A N/A ks rtVal Scalar y N/A True N/A setNull N/A N/A N/A N/A N/A Setting all components of the vec2 to 0.0.

        Returns:
            bool: True if successful.

         N/A N/A N/A N/A self _rtval setNull N/A True N/A equal N/A N/A self other N/A N/A N/A Checks equality of this vec2 with another.

        Args:
            other (Vec2): other vector to check equality with.

        Returns:
            bool: True if equal.

         N/A N/A N/A N/A N/A N/A self _rtval equal Boolean N/A other _rtval getSimpleType N/A almostEqual N/A N/A self other precision N/A N/A N/A Checks almost equality of this Vec2 with another.

        Args:
            other (Vec2): other matrix to check equality with.
            precision (float): Precision value.

        Returns:
            bool: True if almost equal.

         N/A N/A N/A N/A N/A N/A self _rtval almostEqual Boolean N/A other _rtval N/A N/A ks rtVal Scalar precision getSimpleType N/A almostEqual N/A N/A self other N/A N/A N/A Checks almost equality of this Vec2 with another
        (using a default precision).

        Args:
            other (Vec2): other vector to check equality with.

        Returns:
            bool: True if almost equal.

         N/A N/A N/A N/A N/A N/A self _rtval almostEqual Boolean N/A other _rtval getSimpleType N/A component N/A N/A self i N/A N/A N/A Gets the component of this Vec2 by index.

        Args:
            i (int): index of the component to return.

        Returns:
            float: Component of this Vec2.

         N/A N/A N/A N/A N/A N/A self _rtval component Scalar N/A N/A ks rtVal Size i getSimpleType N/A setComponent N/A N/A self i v N/A N/A N/A Sets the component of this Vec2 by index.

        Args:
            i (int): index of the component to set.
            v (float): Value to set component as.

        Returns:
            bool: True if successful.

         N/A N/A N/A N/A self _rtval setComponent N/A N/A ks rtVal Size i N/A N/A ks rtVal Scalar v N/A add N/A N/A self other N/A N/A N/A Overload method for the add operator.

        Args:
            other (Vec2): Other vector to add to this one.

        Returns:
            Vec2: New Vec2 of the sum of the two Vec2's.

         N/A N/A Vec2 N/A N/A N/A self _rtval add Vec2 N/A other _rtval N/A subtract N/A N/A self other N/A N/A N/A Overload method for the subtract operator.

        Args:
            other (Vec2): other vector to subtract from this one.

        Returns:
            Vec2: New Vec2 of the difference of the two Vec2's.

         N/A N/A Vec2 N/A N/A N/A self _rtval subtract Vec2 N/A other _rtval N/A multiply N/A N/A self other N/A N/A N/A Overload method for the multiply operator.

        Args:
            other (Vec2): other vector to multiply from this one.

        Returns:
            Vec2: New Vec2 of the product of the two Vec2's.

         N/A N/A Vec2 N/A N/A N/A self _rtval multiply Vec2 N/A other _rtval N/A divide N/A N/A self other N/A N/A N/A Divides this vector and an other.

        Args:
            other (Vec2): other vector to divide by.

        Returns:
            Vec2: Quotient of the division of this vector by the other.

         N/A N/A Vec2 N/A N/A N/A self _rtval divide Vec2 N/A other _rtval N/A multiplyScalar N/A N/A self other N/A N/A N/A Product of this vector and a scalar.

        Args:
            other (float): Scalar value to multiply this vector by.

        Returns:
            Vec2: Product of the multiplication of the scalar and this vector.

         N/A N/A Vec2 N/A N/A N/A self _rtval multiplyScalar Vec2 N/A N/A ks rtVal Scalar other N/A divideScalar N/A N/A self other N/A N/A N/A Divides this vector and a scalar.

        Args:
            other (float): Value to divide this vector by.

        Returns:
            Vec2: Quotient of the division of the vector by the scalar.

         N/A N/A Vec2 N/A N/A N/A self _rtval divideScalar Vec2 N/A N/A ks rtVal Scalar other N/A negate N/A N/A self N/A N/A N/A Gets the negated version of this vector.

        Returns:
            Vec2: Negation of this vector.

         N/A N/A Vec2 N/A N/A N/A self _rtval negate Vec2 N/A inverse N/A N/A self N/A N/A N/A Get the inverse vector of this vector.

        Returns:
            Vec2: Inverse of this vector.

         N/A N/A Vec2 N/A N/A N/A self _rtval inverse Vec2 N/A dot N/A N/A self other N/A N/A N/A Gets the dot product of this vector and another.

        Args:
            other (Vec2): Other vector.

        Returns:
            float: Dot product.

         N/A N/A N/A N/A N/A N/A self _rtval dot Scalar N/A other _rtval getSimpleType N/A cross N/A N/A self other N/A N/A N/A Gets the cross product of this vector and another.

        Args:
            other (Vec2): Other vector.

        Returns:
            Vec2: Dot product.

         N/A N/A Vec2 N/A N/A N/A self _rtval cross Vec2 N/A other _rtval N/A lengthSquared N/A N/A self N/A N/A N/A Get the squared length of this vector.

        Returns:
            float: Squared length oft his vector.

         N/A N/A N/A N/A N/A N/A self _rtval lengthSquared Scalar getSimpleType N/A length N/A N/A self N/A N/A N/A Gets the length of this vector.

        Returns:
            float: Length of this vector.

         N/A N/A N/A N/A N/A N/A self _rtval length Scalar getSimpleType N/A unit N/A N/A self N/A N/A N/A Gets a unit vector of this one.

        Returns:
            Vec2: New unit vector from this one.

         N/A N/A Vec2 N/A N/A N/A self _rtval unit Vec2 N/A unit_safe N/A N/A self N/A N/A N/A Gets a unit vector of this one, no error reported if cannot be
        made unit.

        Returns:
            Vec2: New unit vector.

         N/A N/A Vec2 N/A N/A N/A self _rtval unit_safe Vec2 N/A setUnit N/A N/A self N/A N/A N/A Sets this vector to a unit vector and returns the previous
        length.

        Returns:
            float: This vector.

         N/A N/A N/A N/A N/A N/A self _rtval setUnit Scalar getSimpleType N/A normalize N/A N/A self N/A N/A N/A Gets a normalized vector from this vector.

        Returns:
            float: Previous length.

         N/A N/A N/A N/A N/A N/A self _rtval normalize Scalar getSimpleType N/A clamp N/A N/A self min max N/A N/A N/A Clamps this vector per component by a min and max vector.

        Args:
            min (float): Minimum value.
            max (float): Maximum value.

        Returns:
            bool: True if successful.

         N/A N/A Vec2 N/A N/A N/A self _rtval clamp Vec2 N/A min _rtval N/A max _rtval N/A unitsAngleTo N/A N/A self other N/A N/A N/A Gets the angle (self, in radians) of this vector to another one
        note expects both vectors to be units (else use angleTo)

        Args:
            other (Vec2): other vector to get angle to.

        Returns:
            float: Angle.

         N/A N/A N/A N/A N/A N/A self _rtval unitsAngleTo Scalar N/A other _rtval getSimpleType N/A angleTo N/A N/A self other N/A N/A N/A Gets the angle (self, in radians) of this vector to another one.

        Args:
            other (Vec2): other vector to get angle to.

        Returns:
            float: Angle.

         N/A N/A N/A N/A N/A N/A self _rtval angleTo Scalar N/A other _rtval getSimpleType N/A distanceTo N/A N/A self other N/A N/A N/A Doc String.

        Args:
            other (Vec2): the other vector to measure the distance to.

        Returns:
            bool: True if successful.

         N/A N/A N/A N/A N/A N/A self _rtval distanceTo Scalar N/A other _rtval getSimpleType N/A linearInterpolate N/A N/A self other t N/A N/A N/A Linearly interpolates this vector with another one based on a scalar
        blend value (0.0 to 1.0).

        Args:
            other (Vec2): vector to blend to.
            t (float): Blend value.

        Returns:
            Vec2: New vector blended between this and the input vector.

         N/A N/A Vec2 N/A N/A N/A self _rtval linearInterpolate Vec2 N/A N/A ks rtVal Scalar t N/A distanceToLine N/A N/A self lineP0 lineP1 N/A N/A N/A Returns the distance of this vector to a line defined by two points
        on the line.

        Args:
            lineP0 (Vec2): point 1 of the line.
            lineP1 (Vec2): point 2 of the line.

        Returns:
            float: Distance to the line.

         N/A N/A N/A N/A N/A N/A self _rtval distanceToLine Scalar N/A lineP0 _rtval N/A lineP1 _rtval getSimpleType N/A distanceToSegment N/A N/A self segmentP0 segmentP1 N/A N/A N/A Returns the distance of this vector to a line segment defined by the
        start and end points of the line segment

        Args:
            segmentP0 (Vec2): point 1 of the segment.
            segmentP1 (Vec2): point 2 of the segment.

        Returns:
            float: Distance to the segment.

         N/A N/A N/A N/A N/A N/A self _rtval distanceToSegment Scalar N/A segmentP0 _rtval N/A segmentP1 _rtval getSimpleType N/A N/A