From 4c0a92c6e57d60fc40be3c6a85678f12571397c0 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sun, 11 Oct 2009 10:54:52 +0200 Subject: Formatting. --- crawl-ref/source/it_use3.cc | 3 ++- crawl-ref/source/ray.cc | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc index b144dc89c7..2d22aaa6b7 100644 --- a/crawl-ref/source/it_use3.cc +++ b/crawl-ref/source/it_use3.cc @@ -446,7 +446,8 @@ static bool _disc_of_storms(void) continue; if (one_chance_in(60 - you.skills[SK_EVOCATIONS])) - place_cloud(CLOUD_RAIN, *ri, random2(you.skills[SK_EVOCATIONS]), KC_YOU); + place_cloud(CLOUD_RAIN, *ri, + random2(you.skills[SK_EVOCATIONS]), KC_YOU); } } diff --git a/crawl-ref/source/ray.cc b/crawl-ref/source/ray.cc index e87950178d..be7ee47600 100644 --- a/crawl-ref/source/ray.cc +++ b/crawl-ref/source/ray.cc @@ -21,28 +21,28 @@ static int _find_next_intercept(double* accx, double* accy, const double slope) { // handle perpendiculars - if ( double_is_zero(slope) ) + if (double_is_zero(slope)) { *accx += 1.0; return 0; } - if ( slope > 100.0 ) + if (slope > 100.0) { *accy += 1.0; return 1; } - const double xtarget = (static_cast(*accx) + 1); - const double ytarget = (static_cast(*accy) + 1); + const double xtarget = static_cast(*accx) + 1; + const double ytarget = static_cast(*accy) + 1; const double xdistance = xtarget - *accx; const double ydistance = ytarget - *accy; - double distdiff = (xdistance * slope - ydistance); + double distdiff = xdistance * slope - ydistance; // exact corner - if ( double_is_zero( distdiff ) ) + if (double_is_zero(distdiff)) { // move somewhat away from the corner - if ( slope > 1.0 ) + if (slope > 1.0) { *accx = xtarget + EPSILON_VALUE * 2; *accy = ytarget + EPSILON_VALUE * 2 * slope; @@ -58,7 +58,7 @@ static int _find_next_intercept(double* accx, double* accy, const double slope) // move to the boundary double traveldist; int rc = -1; - if ( distdiff > 0.0 ) + if (distdiff > 0.0) { traveldist = ydistance / slope; rc = 1; @@ -71,7 +71,7 @@ static int _find_next_intercept(double* accx, double* accy, const double slope) // and a little into the next cell, taking care // not to go too far - if ( distdiff < 0.0 ) + if (distdiff < 0.0) distdiff = -distdiff; traveldist += std::min(EPSILON_VALUE * 10.0, 0.5 * distdiff / slope); -- cgit v1.2.3-54-g00ecf