## Maya Training

Introduction to Hard Surface Modeling

## Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

## Maya Training

Shading, Lighting and Rendering the Bedroom in MR

## Maya Training

Robot volume one - Modeling with animation in mind

## Maya Training

Spach-Alspaugh House the complete courseware

## Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

## New Maya Training

Batman by Jason Edwards
You are here > Home > SimplyMaya Community Forums

# Welcome to Simply Maya

 Simply Maya User Community - Maya Tutorials How to detect odd or even numbers
 Register FAQ Members List Calendar Mark Forums Read

 27-02-2006, 11:40 AM #1 skywola Registered User     Join Date: Jan 2004 Location: Tempe, Arizona, USA Posts: 224 Thanks: 0 Thanked 0 Times in 0 Posts How to detect odd or even numbers How to Detect odd or even numbers in MEL int \$num = 1; if (\$num % 2 == 0) print(\$num + " even"); else print(\$num + " odd"); \$num++; __________________ "The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
 27-02-2006, 10:59 PM #2 MattTheMan Registered User     Join Date: Apr 2005 Location: Fairfield, CT Posts: 2,436 Thanks: 0 Thanked 18 Times in 18 Posts i dont know MEL, but I know C++, so: cant u divide a number by 2, then store the result in a char with 8 places, then scan the char, if the char has a dot in it then its odd, if not its even. __________________ Live the life you love, love the life you live
 28-02-2006, 04:06 AM #3 skywola Registered User     Join Date: Jan 2004 Location: Tempe, Arizona, USA Posts: 224 Thanks: 0 Thanked 0 Times in 0 Posts In MEL - no . . . . MEL is a much easier language than C++, although C++ undoubtably has more power, and more bells and whistles, so to speak. __________________ "The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
 28-02-2006, 08:00 AM #4 Alan Moderator     Join Date: Oct 2002 Location: London, UK Posts: 2,800 Thanks: 0 Thanked 5 Times in 5 Posts you've done it right by using the modulus command. If you get nothing back then it's even (i think! it's a bit early in the morning for maths! ) A __________________ Technical Director - Framestore Currently working on: Your Highness IMDB

A little bit about who we are