struct Vector2
- Vector2
- Struct
- Value
- Object
Included Modules
- Cannon::FastAuto
- Cannon::FastAutoToIo
- YAML::Serializable
Extended Modules
- Cannon::FastAutoFromIo
Defined in:
engine/aabb.crengine/vector2.cr
gui/general.cr
Constructors
Class Method Summary
- .from_angle(angle, length)
-
.use_fast_cannon?
Magic method to mark this structure as being fast en-/decodable.
- .zero
Instance Method Summary
- #*(scale : Number)
- #+(other)
- #-(other)
- #-
- #/(scale : Number)
- #/(scale)
- #abs
- #angle
- #clone
- #close(other, eps = 1.0)
- #copy_with(x _x = @x, y _y = @y)
- #cross(other)
- #dot(other)
- #inside?(aabb)
- #inspect(io)
- #length
- #max
- #min
- #normalize
- #rotate(angle)
- #scale(other)
- #sqrlength
- #to_i
- #x : Float64
- #y : Float64