# Determining which value is larger

**URL:** <https://forum.kirupa.com/t/determining-which-value-is-larger/173147>\
**Category:** Uncategorized\
**Created:** [December 21, 2005, 5:50pm UTC](https://forum.kirupa.com/t/determining-which-value-is-larger/173147 "2005-12-21T17:50:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sixfngers](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@sixfngers](https://forum.kirupa.com/u/sixfngers)\
**Post date:** [December 21, 2005, 5:50pm UTC](https://forum.kirupa.com/t/determining-which-value-is-larger/173147/1 "2005-12-21T17:50:40Z")

</div>

i know there is a code that determines which of two values is larger and returns the larger value.

i cannot seem to find it in the actionscript help.

i know you can do it with

```auto
if (val1>val2) {
	val3 = val1;
} else {
	val3 = val2;
}

```

but there is an easier way and i cannot find the file that i used it in previuosly.

anyone.

thanks
