Friday night’s official clinching of a playoff berth was a small step for the Knicks’ lofty goals, but the win was a giant step for Carmelo Anthony and new starting center Kenyon Martin in their respective comebacks.

In a marathon-like 43 minutes, Anthony put forth a dynamic two-way game and Martin had a near perfect game as the Knicks beat the Raptors for the first time this season, 99-94, at Air Canada Centre for their third straight win.

Anthony, in his second game back from the knee procedure, lit it up with 37 points and played the entire second half. He finally exhibited a vibrancy on defense and an ear to ear smile through much of the contest. Oh, how different he looked that tragic night in Denver nine days ago when he walked off the court early in the third quarter with his swollen knee, bound for New York and a knee procedure.

Martin, meanwhile was 9 of 9 from the field before a last-minute miss and finished with a season-high 19 points and 11 rebounds. He is starting at center as the Knicks wait for Tyson Chandler’s stiff neck to heal.

Anthony may have had a slight limp to his gait in the locker room after the contest, but the star forward was all smiles.

“The game is just fun, especially when I’m able to play the way I know how to play and be confident in things I’m doing on the court,’’ Anthony said. “When I’m having fun, the game is so much easier for myself and so much easier for us as a team because we feed off each other. When they see me out there having fun, everybody has fun.”

Martin is having fun as the Knicks moved to 41-26 with 15 games left. He was signed on Feb. 23 as insurance and who knew virtually all their big men would go down.

“He’s a true professional,’’ said Jason Kidd, who turns 40 today. “If we didn’t have him, we’d be in trouble right now.’’

Coach Mike Woodson said if the Knicks didn’t scoop him up, some playoff-bound club would have. Martin said he didn’t have any serious bites.

“Whoever called first,’’ Martin said. “If it was Miami, I was going to Miami.’’

It’s a good thing Pat Riley didn’t pick up the phone. The Knicks are now a playoff team for the third straight season and will attempt to win their first playoff series since 2001. During the depressing days of the 2000 decade, the Knicks missed the playoffs six straight seasons but now nothing short of a berth into the Eastern Conference Finals against Miami would be considered a failure.