Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: .Net open source content management platform like Sharepoint? Pin
George_George15-Jan-09 18:10
George_George15-Jan-09 18:10 
GeneralRe: .Net open source content management platform like Sharepoint? Pin
Hamid_RT15-Jan-09 20:14
Hamid_RT15-Jan-09 20:14 
GeneralRe: .Net open source content management platform like Sharepoint? Pin
George_George15-Jan-09 20:49
George_George15-Jan-09 20:49 
GeneralRe: .Net open source content management platform like Sharepoint? Pin
Hamid_RT15-Jan-09 21:15
Hamid_RT15-Jan-09 21:15 
QuestionRotation Algorithm Pin
Richard Blythe14-Jan-09 15:21
Richard Blythe14-Jan-09 15:21 
AnswerRe: Rotation Algorithm [modified] Pin
Luc Pattyn14-Jan-09 15:41
sitebuilderLuc Pattyn14-Jan-09 15:41 
GeneralRe: Rotation Algorithm Pin
Richard Blythe14-Jan-09 16:07
Richard Blythe14-Jan-09 16:07 
AnswerRe: Rotation Algorithm Pin
Guffa14-Jan-09 16:36
Guffa14-Jan-09 16:36 
There are two problems with your code:

1. As Luc already mentioned, you are casting the values to int, which accumulates rounding errors. Use PointF structures to get better resolution.

2. You are using the new value for x when calculating the value for y. You need to first calculate both x and y from the original values, then store the new values in the Point structure. Actually, instead of changing a PointF structure you should return a new PointF value from the method:
PointF Rotate(PointF p, PointF centerPoint, double angle) {
	return new PointF(
		(float)(centerPoint.X + (p.X - centerPoint.X) * Math.Cos(angle) - (p.Y - centerPoint.Y) * Math.Sin(angle)),
		(float)(centerPoint.Y + (p.X - centerPoint.X) * Math.Sin(angle) + (p.Y - centerPoint.Y) * Math.Cos(angle))
	);
}

GeneralRe: Rotation Algorithm Pin
Richard Blythe14-Jan-09 16:55
Richard Blythe14-Jan-09 16:55 
QuestionIOException when calling AuthenticateAsClient Pin
KRM14-Jan-09 13:14
KRM14-Jan-09 13:14 
QuestionC# and logitech Momo wheel Pin
Member 260151314-Jan-09 12:50
Member 260151314-Jan-09 12:50 
AnswerRe: C# and logitech Momo wheel Pin
Mark Churchill14-Jan-09 12:58
Mark Churchill14-Jan-09 12:58 
QuestionHow to get actual IP address of the computer? Pin
MAP Tiger14-Jan-09 12:45
MAP Tiger14-Jan-09 12:45 
AnswerRe: How to get actual IP address of the computer? Pin
S. Senthil Kumar14-Jan-09 22:18
S. Senthil Kumar14-Jan-09 22:18 
GeneralRe: How to get actual IP address of the computer? Pin
MAP Tiger15-Jan-09 6:56
MAP Tiger15-Jan-09 6:56 
QuestionCollecting values from datagridview.selectedrows[0].cells Pin
Lodeclaw14-Jan-09 11:21
Lodeclaw14-Jan-09 11:21 
AnswerRe: Collecting values from datagridview.selectedrows[0].cells Pin
Cassandra Ross14-Jan-09 11:33
Cassandra Ross14-Jan-09 11:33 
GeneralRe: Collecting values from datagridview.selectedrows[0].cells Pin
Lodeclaw14-Jan-09 11:45
Lodeclaw14-Jan-09 11:45 
GeneralRe: Collecting values from datagridview.selectedrows[0].cells Pin
Cassandra Ross14-Jan-09 12:07
Cassandra Ross14-Jan-09 12:07 
GeneralRe: Collecting values from datagridview.selectedrows[0].cells Pin
Lodeclaw14-Jan-09 12:19
Lodeclaw14-Jan-09 12:19 
QuestionGetting ToolStrip button's CheckState to reflect RichTextBox content Pin
Member 263050314-Jan-09 10:32
Member 263050314-Jan-09 10:32 
AnswerRe: Getting ToolStrip button's CheckState to reflect RichTextBox content Pin
Cassandra Ross14-Jan-09 11:43
Cassandra Ross14-Jan-09 11:43 
AnswerRe: Getting ToolStrip button's CheckState to reflect RichTextBox content Pin
Member 263050315-Jan-09 4:50
Member 263050315-Jan-09 4:50 
QuestionBindng and display problem Pin
wi5nia14-Jan-09 9:52
wi5nia14-Jan-09 9:52 
AnswerRe: Bindng and display problem Pin
Wendelius14-Jan-09 11:14
mentorWendelius14-Jan-09 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.