distances/costs

3 views
Skip to first unread message

Jim Kaiser

unread,
Aug 3, 2012, 5:00:28 PM8/3/12
to byu-cs-312-summer
So, I was looking at the CostToGetTo method of the City class, and I noticed that although it returns a double, Math.Round always returns an integer. Can we just store the distances/costs as integers? It seems like this would give a performance boost when doing calculations with these numbers. 

Jim

Christopher Tensmeyer

unread,
Aug 3, 2012, 5:07:38 PM8/3/12
to byu-cs-3...@googlegroups.com
Yes, you may store the distances/costs as integers.

Chris

On Fri, Aug 3, 2012 at 3:00 PM, Jim Kaiser <jimka...@gmail.com> wrote:
So, I was looking at the CostToGetTo method of the City class, and I noticed that although it returns a double, Math.Round always returns an integer. Can we just store the distances/costs as integers? It seems like this would give a performance boost when doing calculations with these numbers. 

Jim

--
You received this message because you are subscribed to the Google Groups "BYU CS 312 Summer 2012" group.
To post to this group, send email to byu-cs-3...@googlegroups.com.
To unsubscribe from this group, send email to byu-cs-312-sum...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages