module Math

Extended Modules

Defined in:

libgodot/types.cr

Class Method Summary

Class Method Detail

def self.lerp(from : Float32, to : Float32, weight : Float32) : Float32 #

Linearly interpolates between from and to by weight.


[View source]
def self.lerp(from : Float64, to : Float64, weight : Float64) : Float64 #

[View source]
def self.move_toward(from : Float32, to : Float32, delta : Float32) : Float32 #

Moves from toward to by the given delta amount, never exceeding to.


[View source]
def self.move_toward(from : Float64, to : Float64, delta : Float64) : Float64 #

Moves from toward to by the given delta amount with 64-bit precision, never exceeding to.


[View source]