<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>X-pack.org &#187; Math</title>
	<atom:link href="http://home.x-pack.org/category/free-source-code/delphi/math/feed/" rel="self" type="application/rss+xml" />
	<link>http://home.x-pack.org</link>
	<description>Download all you need here</description>
	<lastBuildDate>Fri, 18 May 2012 11:09:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>[ Delphi ] – Get the last day of the current month</title>
		<link>http://home.x-pack.org/delphi-get-the-last-day-of-the-current-month/</link>
		<comments>http://home.x-pack.org/delphi-get-the-last-day-of-the-current-month/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 10:17:31 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=139</guid>
		<description><![CDATA[function LastDayOfCurrentMonth: TDate; var &#160;&#160;y, m, d: Word; begin &#160;&#160;DecodeDate(now, y, m, d); &#160;&#160;m := m + 1; &#160;&#160;if m&#160;&#160;12 then &#160;&#160;begin &#160;&#160;&#160;&#160;y := y + 1; &#160;&#160;&#160;&#160;m := 1; &#160;&#160;end; &#160;&#160;Result := EncodeDate(y, m, 1) - 1; end; procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;ShowMessage(DateToStr(LastDayOfCurrentMonth)); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-get-the-last-day-of-the-current-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Convert a hexadecimal number into a binary number</title>
		<link>http://home.x-pack.org/delphi-convert-a-hexadecimal-number-into-a-binary-number/</link>
		<comments>http://home.x-pack.org/delphi-convert-a-hexadecimal-number-into-a-binary-number/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 10:16:41 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=137</guid>
		<description><![CDATA[function HexToBin(Hexadecimal: string): string; const &#160;&#160;BCD: array [0..15] of string = &#160;&#160;&#160;&#160;('0000', '0001', '0010', '0011', '0100', '0101', '0110', '0111', &#160;&#160;&#160;&#160;'1000', '1001', '1010', '1011', '1100', '1101', '1110', '1111'); var &#160;&#160;i: integer; begin &#160;&#160;for i := Length(Hexadecimal) downto 1 do &#160;&#160;&#160;&#160;Result := BCD[StrToInt('$' + Hexadecimal[i])] + Result; end; procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;ShowMessage(HexToBin('FAA4')); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-convert-a-hexadecimal-number-into-a-binary-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Convert a Binary Number into a Decimal Number</title>
		<link>http://home.x-pack.org/delphi-convert-a-binary-number-into-a-decimal-number/</link>
		<comments>http://home.x-pack.org/delphi-convert-a-binary-number-into-a-decimal-number/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 10:15:55 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=135</guid>
		<description><![CDATA[function BinToInt(Value: string): Integer; var &#160;&#160;i, iValueSize: Integer; begin &#160;&#160;Result := 0; &#160;&#160;iValueSize := Length(Value); &#160;&#160;for i := iValueSize downto 1 do &#160;&#160;&#160;&#160;if Value[i] = '1' then Result := Result + (1 shl (iValueSize - i)); end; function IntToBin1(Value: Longint; Digits: Integer): string; var &#160;&#160;i: Integer; begin &#160;&#160;Result := ''; &#160;&#160;for i := Digits downto]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-convert-a-binary-number-into-a-decimal-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Know if the Time is AM or PM</title>
		<link>http://home.x-pack.org/delphi-know-if-the-time-is-am-or-pm/</link>
		<comments>http://home.x-pack.org/delphi-know-if-the-time-is-am-or-pm/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 10:14:48 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=133</guid>
		<description><![CDATA[procedure AM_or_PM; begin &#160;&#160;if Frac(Time) = 0 then &#160;&#160;&#160;&#160;ShowMessage('AM') &#160;&#160;else &#160;&#160;&#160;&#160;ShowMessage('PM'); end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-know-if-the-time-is-am-or-pm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Get the number of the day in the year</title>
		<link>http://home.x-pack.org/delphi-get-the-number-of-the-day-in-the-year/</link>
		<comments>http://home.x-pack.org/delphi-get-the-number-of-the-day-in-the-year/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 10:13:07 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=131</guid>
		<description><![CDATA[function GetDays(ADate: TDate): Extended; var &#160;&#160;FirstOfYear: TDateTime; begin &#160;&#160;FirstOfYear := EncodeDate(StrToInt(FormatDateTime('yyyy', now)) - 1, 12, 31); &#160;&#160;Result&#160;&#160;&#160;&#160;&#160;&#160;:= ADate - FirstOfYear; end; procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;label1.Caption := 'Today is the ' + FloatToStr(GetDays(Date)) + '. day of the year'; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-get-the-number-of-the-day-in-the-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Convert an octal number to integer</title>
		<link>http://home.x-pack.org/delphi-convert-an-octal-number-to-integer/</link>
		<comments>http://home.x-pack.org/delphi-convert-an-octal-number-to-integer/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 10:10:37 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=127</guid>
		<description><![CDATA[function OctToInt(Value: string): Longint; var &#160;&#160;i: Integer; &#160;&#160;int: Integer; begin &#160;&#160;int := 0; &#160;&#160;for i := 1 to Length(Value) do &#160;&#160;begin &#160;&#160;&#160;&#160;int := int * 8 + StrToInt(Copy(Value, i, 1)); &#160;&#160;end; &#160;&#160;Result := int; end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-convert-an-octal-number-to-integer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Validate an IBAN</title>
		<link>http://home.x-pack.org/delphi-validate-an-iban/</link>
		<comments>http://home.x-pack.org/delphi-validate-an-iban/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 10:07:32 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=121</guid>
		<description><![CDATA[function ChangeAlpha(input: string): string; var &#160;&#160;a: Char; begin &#160;&#160;Result := input; &#160;&#160;for a := 'A' to 'Z' do &#160;&#160;begin &#160;&#160;&#160;&#160;Result := StringReplace(Result, a, IntToStr(Ord(a) - 55), [rfReplaceAll]); &#160;&#160;end; end; function CalculateDigits(iban: string): Integer; var &#160;&#160;v, l: Integer; &#160;&#160;alpha: string; &#160;&#160;number: Longint; &#160;&#160;rest: Integer; begin &#160;&#160;iban := UpperCase(iban); &#160;&#160;if Pos('IBAN', iban) &#62; 0 then &#160;&#160;&#160;&#160;Delete(iban, Pos('IBAN',]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-validate-an-iban/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Decode a TDate type</title>
		<link>http://home.x-pack.org/delphi-decode-a-tdate-type/</link>
		<comments>http://home.x-pack.org/delphi-decode-a-tdate-type/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:20:20 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=145</guid>
		<description><![CDATA[procedure TForm1.Button1Click(Sender: TObject); const &#160;&#160;Year, Month, Day: Word; begin &#160;&#160;DecodeDate(Date, Year, Month, Day); &#160;&#160;Label1.Caption := IntToStr(Year);&#160;&#160;// 2001 &#160;&#160;Label2.Caption := IntToStr(Month); // 12 &#160;&#160;Label3.Caption := IntToStr(Day);&#160;&#160; // 12 end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-decode-a-tdate-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Convert Hex codes to Integer</title>
		<link>http://home.x-pack.org/delphi-convert-hex-codes-to-integer/</link>
		<comments>http://home.x-pack.org/delphi-convert-hex-codes-to-integer/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:19:25 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=143</guid>
		<description><![CDATA[procedure TForm1.Button1Click(Sender: TObject); begin &#160;&#160;label1.Caption := IntToStr(StrToInt(&#8216;$AFFE&#8217;)); //45054 end;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-convert-hex-codes-to-integer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Convert an Integer to an octal number</title>
		<link>http://home.x-pack.org/delphi-convert-an-integer-to-an-octal-number/</link>
		<comments>http://home.x-pack.org/delphi-convert-an-integer-to-an-octal-number/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:12:30 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=129</guid>
		<description><![CDATA[function IntToOct(Value: Longint; digits: Integer): string; var &#160;&#160;rest: Longint; &#160;&#160;oct: string; &#160;&#160;i: Integer; begin &#160;&#160;oct := ''; &#160;&#160;while Value &#60;&#62; 0 do &#160;&#160;begin &#160;&#160;&#160;&#160;rest&#160;&#160;:= Value mod 8; &#160;&#160;&#160;&#160;Value := Value div 8; &#160;&#160;&#160;&#160;oct := IntToStr(rest) + oct; &#160;&#160;end; &#160;&#160;for i := Length(oct) + 1 to digits do &#160;&#160;&#160;&#160;oct := '0' + oct; &#160;&#160;Result := oct;]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-convert-an-integer-to-an-octal-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Round numbers to a predetermined number of decimals</title>
		<link>http://home.x-pack.org/delphi-round-numbers-to-a-predetermined-number-of-decimals/</link>
		<comments>http://home.x-pack.org/delphi-round-numbers-to-a-predetermined-number-of-decimals/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:09:45 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=125</guid>
		<description><![CDATA[function Rounder(var Value: Double; Decimals: Integer): Double; var &#160;&#160;j: Integer; &#160;&#160;A: Double; begin &#160;&#160;A := 1; &#160;&#160;case Decimals of &#160;&#160;&#160;&#160;0: A := 1; &#160;&#160;&#160;&#160;1: A := 10; &#160;&#160;&#160;&#160;else &#160;&#160;&#160;&#160;&#160;&#160;for j := 1 to Decimals do &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;A := A * 10; &#160;&#160;end; &#160;&#160;Result := Int((Value * A) + 0.5) / A; end; procedure TForm1.Button1Click(Sender: TObject); var]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-round-numbers-to-a-predetermined-number-of-decimals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Calculate the age of a person</title>
		<link>http://home.x-pack.org/delphi-calculate-the-age-of-a-person/</link>
		<comments>http://home.x-pack.org/delphi-calculate-the-age-of-a-person/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:06:31 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=119</guid>
		<description><![CDATA[function CalculateAge(Birthday, CurrentDate: TDate): Integer; var &#160;&#160;Month, Day, Year, CurrentYear, CurrentMonth, CurrentDay: Word; begin &#160;&#160;DecodeDate(Birthday, Year, Month, Day); &#160;&#160;DecodeDate(CurrentDate, CurrentYear, CurrentMonth, CurrentDay); &#160;&#160;if (Year = CurrentYear) and (Month = CurrentMonth) and (Day = CurrentDay) then &#160;&#160;begin &#160;&#160;&#160;&#160;Result := 0; &#160;&#160;end &#160;&#160;else &#160;&#160;begin &#160;&#160;&#160;&#160;Result := CurrentYear - Year; &#160;&#160;&#160;&#160;if (Month &#62; CurrentMonth) then &#160;&#160;&#160;&#160;&#160;&#160;Dec(Result) &#160;&#160;&#160;&#160;else &#160;&#160;&#160;&#160;begin]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-calculate-the-age-of-a-person/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Determine the circum-center of a 2D triangle</title>
		<link>http://home.x-pack.org/delphi-determine-the-circum-center-of-a-2d-triangle/</link>
		<comments>http://home.x-pack.org/delphi-determine-the-circum-center-of-a-2d-triangle/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:05:10 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=117</guid>
		<description><![CDATA[procedure Circumcenter(x1, y1, x2, y2, x3, y3: Double; var Px, Py: Double); var &#160;&#160;A, C, B, D, E, F, G: Double; begin &#160;&#160;A := x2 - x1; &#160;&#160;B := y2 - y1; &#160;&#160;C := x3 - x1; &#160;&#160;D := y3 - y1; &#160;&#160;E := A * (x1 + x2) + B * (y1 + y3);]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-determine-the-circum-center-of-a-2d-triangle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Determine if a 2D point exists within a 2D triangle</title>
		<link>http://home.x-pack.org/delphi-determine-if-a-2d-point-exists-within-a-2d-triangle/</link>
		<comments>http://home.x-pack.org/delphi-determine-if-a-2d-point-exists-within-a-2d-triangle/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:03:53 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=115</guid>
		<description><![CDATA[function PntInTriangle(Px, Py, x1, y1, x2, y2, x3, y3: Double): Boolean; var &#160;&#160;Or1, Or2, Or3: Double; begin &#160;&#160;Or1&#160;&#160;&#160;&#160;:= Orientation(x1, y1, x2, y2, Px, Py); &#160;&#160;Or2&#160;&#160;&#160;&#160;:= Orientation(x2, y2, x3, y3, Px, Py); &#160;&#160;Or3&#160;&#160;&#160;&#160;:= Orientation(x3, y3, x1, y1, Px, Py); &#160;&#160;Result := (Or1 = Or2) and (Or2 = Or3); end; function Orientation(x1, y1, x2, y2, Px, Py:]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-determine-if-a-2d-point-exists-within-a-2d-triangle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[ Delphi ] – Determine The circumcenter of 3 points</title>
		<link>http://home.x-pack.org/delphi-determine-the-circumcenter-of-3-points/</link>
		<comments>http://home.x-pack.org/delphi-determine-the-circumcenter-of-3-points/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 10:02:06 +0000</pubDate>
		<dc:creator>delphi geek</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://localhost/a/?p=113</guid>
		<description><![CDATA[procedure Circumcenter(const x1, y1, x2, y2, x3, y3: Double; out Px, Py: Double); var &#160;&#160;A: Double; &#160;&#160;C: Double; &#160;&#160;B: Double; &#160;&#160;D: Double; &#160;&#160;E: Double; &#160;&#160;F: Double; &#160;&#160;G: Double; begin &#160;&#160;A := x2 - x1; &#160;&#160;B := y2 - y1; &#160;&#160;C := x3 - x1; &#160;&#160;D := y3 - y1; &#160;&#160;E := A * (x1 +]]></description>
		<wfw:commentRss>http://home.x-pack.org/delphi-determine-the-circumcenter-of-3-points/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 35/85 queries in 0.145 seconds using disk: basic
Object Caching 811/919 objects using disk: basic

Served from: home.x-pack.org @ 2012-05-19 05:05:43 -->
