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.Max

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

Parameters

Description

Returns largest of two or more values.

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

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

Parameters

Description

Returns the largest of two or more values.

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