Handbook
Glossary
Vector2
Vocabulary
raylib
Class description
Represents a 2D vector in Raylib. Implements the
Sequence protocol
.
Warning
Values are all single-precision where as Factor is double precision (see
float
)
Definition
USING:
alien.c-types
classes.struct
;
IN:
raylib
STRUCT:
Vector2
{
x
float
initial:
0.0
}
{
y
float
initial:
0.0
}
;
Methods
USING:
classes.struct
classes.struct.private
kernel
raylib
;
M:
Vector2
clone
clone-underlying
\
Vector2
memory>struct
;
inline
USING:
kernel
raylib
sequences
;
M:
Vector2
length
drop
2
;
inline
USING:
kernel
raylib
sequences
;
M:
Vector2
like
over
length
2
=
[
drop
dup
Vector2?
[
first2
<Vector2>
]
unless
]
[
invalid-vector-length
]
if
;
inline
USING:
classes.struct
kernel
raylib
sequences
;
M:
Vector2
new-sequence
over
2
=
[
2drop
Vector2
(struct)
]
[
invalid-vector-length
]
if
;
inline
USING:
accessors
kernel
raylib
sequences.private
;
M:
Vector2
nth-unsafe
swap
0
=
[
x>>
]
[
y>>
]
if
;
USING:
accessors
kernel
raylib
sequences.private
;
M:
Vector2
set-nth-unsafe
swap
0
=
[
x<<
]
[
y<<
]
if
;
USING:
accessors
classes.struct
combinators.smart
raylib
;
M:
Vector2
struct-slot-values
{
[
x>>
]
[
y>>
]
}
cleave>array
;
inline