1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Tools/MathTool.gd
T

11 lines
276 B
GDScript

class_name MathTool
static func rate(value: float):
return randf() < value
static func randv2_range(offset: float):
return Vector2(
randf_range(-offset, offset),
randf_range(-offset, offset)
)
static func randc_from(array: Array):
return array[randi() % array.size()]