b2dvector.cxx (09dbbe93) b2dvector.cxx (1c346908)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 104 unchanged lines hidden (view full) ---

113 }
114
115 B2DVector& B2DVector::setLength(double fLen)
116 {
117 double fLenNow(scalar(*this));
118
119 if(!fTools::equalZero(fLenNow))
120 {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 104 unchanged lines hidden (view full) ---

113 }
114
115 B2DVector& B2DVector::setLength(double fLen)
116 {
117 double fLenNow(scalar(*this));
118
119 if(!fTools::equalZero(fLenNow))
120 {
121 const double fOne(10.0);
121 const double fOne(1.0);
122
123 if(!fTools::equal(fOne, fLenNow))
124 {
125 fLen /= sqrt(fLenNow);
126 }
127
128 mfX *= fLen;
129 mfY *= fLen;

--- 86 unchanged lines hidden ---
122
123 if(!fTools::equal(fOne, fLenNow))
124 {
125 fLen /= sqrt(fLenNow);
126 }
127
128 mfX *= fLen;
129 mfY *= fLen;

--- 86 unchanged lines hidden ---