VB2010- why i get a different vertical size\color on RayCasting? Programming Software Development by cambalinho … = Math.Abs((player.PosX - HorizX) / Math.Cos(RayRadians)) 'Check for vertical intersections: If RayRadians <…VertColor = Color.Blue End If WallDistance = WallDistance * Math.Cos(RayRadians - player.Radians) 'avoiding the Fish Effect RayHeight … Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho …- Player.PosY))) HorizDist = Abs((Player.PosX - HorizX) / Cos(RayRadians)) 'Check for vertical intersections: If ((RayRadians < PI…;vertical line" End If WallDistance = WallDistance * Cos(Abs(RayRadians - Player.Radians)) 'avoiding the Fish Effect… Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho ….Radians <= 0) Then Player.Radians = 2 * PI Player.MoveX = Cos(Player.Radians) * Speed Player.MoveY = Sin(Player.Radians) * Speed ElseIf….Radians >= 2 * PI) Then Player.Radians = 0 Player.MoveX = Cos(Player.Radians) * Speed Player.MoveY = Sin(Player.Radians) * Speed ElseIf… VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho …; vbTab & "vertical line" End If WallDistance = WallDistance * Cos(Player.Radians) RayHeight = ObjectSize / WallDistance * 320 A.ForeColor vbBlue A… Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho … fine... i need correct another calculation after these: WallDistance = WallDistance * Cos(Player.Radians) 'avoiding the Fish Effect.. works correctly RayHeight = ObjectSize… Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho not so easy :( WallDistance = WallDistance * Cos(Abs(RayRadians - Player.Radians)) 'avoiding the Fish Effect RayHeight = (ObjectSize / … Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by rproffitt For VertDist I would set a break on line 104 so I could examine the values in line 103. Also, could be a localization issue that the comma is used for the decimal point and the integer of the results might be 35 and 4548. Re: VB6 - RayCasting: why my Vertical intersection is so big? Programming Software Development by cambalinho after several tests i fix it: Do While RayCounts < RayCount If (RayRadians > (2 * PI)) Then RayRadians = 0.001 i have more to update: 1 - win more performance\FPS; 2 - and trying avoid the 'on error resume next'(it's about the array dimensions): Private Sub DrawRays2() Dim AY As Double… Re: [Help] cos() function with Classes Programming Software Development by Narue >cos( n1 ) n1 is an object of NumeroReal, but it doesn't support an implicit conversion to any of the types that cos expects. Perhaps you meant [ICODE]n1.cos()[/ICODE]? That should give you an interesting result too, but it's more likely to take you in the right direction than trying to convert an object to floating-point. :icon_rolleyes: Re: Ctime Programming Software Development by Narue >Cos' when I search on google and I when thought I … Re: XP Replacement Distro? Hardware and Software Linux and Unix by jbennet cos the lack of a decent updater would be offset by … Re: How High Can We Count - Game Community Center Geeks' Lounge by jimlaver [(Cos 0)(Sin 90)] = 1 Re: How High Can We Count - Game Community Center Geeks' Lounge by Duki (cos)1.5574077246549022305069748074584 = ~1 Re: How High Can We Count - Game Community Center Geeks' Lounge by ~s.o.s~ cos (0) * 100 + 0.0001 => 100.0001 Re: How High Can We Count - Game Community Center Geeks' Lounge by paramasivan cos(0) = 1 Re: How High Can We Count - Game Community Center Geeks' Lounge by Serunson cos 0 = 90 Re: How High Can We Count - Game Community Center Geeks' Lounge by paramasivan cos 90 = 0 Re: How High Can We Count - Game Community Center Geeks' Lounge by paramasivan cos 0 = 1 Re: URGENT any free movie splitter Hardware and Software Microsoft Windows by geebalicous cos its due 2morro :) Re: Please need help in this "new Integer(i)" Programming Software Development by Dhruv Gairola cos the add method of the vector only accepts objects. therefore, primitive values like ints will not be accepted. only Integer objects will be accepted. refer api: [url]http://download.oracle.com/javase/1.4.2/docs/api/java/util/Vector.html[/url] Re: Game engine/environment Programming Game Development by SgtMe 'Cos the free community isn't getting paid, so there's no incentive. Re: Adding a "/" to a drive Community Center Meta DaniWeb by gerbil Cos all I do is try to type posts. I don't make aeroplanes, either. Nor do I fly them. I think my point is that I am highly uninterested in learning something for one rare application. [Help] cos() function with Classes Programming Software Development by Max_Payne … >> ( istream &input, NumeroReal &unNumeroReal ); NumeroReal cos() const; }; [/code] [b]NumeroReal.cpp[/b] [code] #include …gt;> unNumeroReal.n; return ( input ); } NumeroReal NumeroReal::cos() const { return ( this->cos() ); } [/code] Main.cpp [code] #include "… Re: wrong values coming from cos() function Programming Software Development by jephthah … -PI to +PI, therefore covering all possible output values of COS() if someone sticks in a theta multiplier greater than +1… between -PI and +PI radians. for instance [CODE=text]cos( 5.0 * PI) = cos( 1.0 * PI) --> 3.0 - ( 2 * 2… * PI) --> -3.9 - (-2 * 2) = 0.1 cos(77.5 * PI) = cos( 1.5 * PI) --> 77.5 - (38 * 2) = 1… Re: wrong values coming from cos() function Programming Software Development by tquiva … -PI to +PI, therefore covering all possible output values of COS() if someone sticks in a theta multiplier greater than +1… between -PI and +PI radians. for instance [CODE=text]cos( 5.0 * PI) = cos( 1.0 * PI) --> 3.0 - ( 2 * 2… into cosi(). How would it be related to finding the cos of an angle? My program seems alright now and I… Re: [Help] cos() function with Classes Programming Software Development by Narue >I was trying to do an overloading to cos() to be able to use it without the dot. You never defined a global cos function, so naturally your compiler will find the ones from cmath. Anyway, naming your global functions the same as a standard library function is flirting with danger. I'd suggest you over it and use the dot syntax. Re: [Help] cos() function with Classes Programming Software Development by Max_Payne I was trying to do an overloading to cos() to be able to use it without the dot. Re: wrong values coming from cos() function Programming Software Development by jephthah … //... get mulitplier input theta = PI * multiplier; approxVal = cosi(theta); realVal = cos(theta); //... print results isClose = close_enough(approxVal, realVal); printf("Using… %d Taylor Series terms to compute cos(%06.4f) %s \"close enough\".\n",… Re: The problem with using Java's maths.cos() Programming Software Development by LiBOC … about. Why would Cos90 and Cos270 in math.cos() be not 0? So sorry, for the timebeing…cosine angle of x WITHOUT using the math.cos() 2)It allows students or users to type…CONCLUSION : The ultimate questions is, 1) Why math.cos() for 90 and 270 is not 0. 2) …How do I not use math.cos() to calculate cosine. I will be posting the… Re: find value of cos without using math library function Programming Software Development by ddanbe ….WriteLine("Calculated cosine of {0} = {1}", d, cos(d)); Console.WriteLine(); } Console.ReadKey(); //keep console on screen until… key press } static double cos(double x) //calculate cosine { double p = x * x; //…