He beat Maurizio Bormolini of Italy to clinch his fourth World Cup victory.
Two years ago Mastnak won silver at the Beijing Olympics, after beating Italian Mirko Felicetti in the semi-finals.
In the women's race, Slovenia's Gloria Kotnik finished fourth today.
Tomorrow, snowboarders will compete in parallel slalom events.