Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Mathf.Min

Switch to Manual
public static function Min(a: float, b: float): float;
public static function Min(params values: float[]): float;

Parameters

Description

Returns the smallest of two or more values.

	// prints 1.2
	print(Mathf.Min(1.2, 2.4));

public static function Min(a: int, b: int): int;
public static function Min(params values: int[]): int;

Parameters

Description

Returns the smallest of two or more values.

	// prints 1
	print(Mathf.Min(1, 2));