Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Copyright (c) 2012 [iPs]TeaM
- * Bruno da Silva (brunoemail@r7.com)
- * Função para saber se o número faz parte da sequencia triangular ou não
- * www.brunodasilva.com
- * www.ips-team.forumeiros.com
- */
- function isTriangular(n)
- {
- n42 = Math.round(Math.sqrt(n * 2));
- return (n42 * (n42 + 1)) == n * 2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement