| 59 | } |
| 60 | |
| 61 | m_Vec3 LongRand::RandDirection() |
| 62 | { |
| 63 | m_Vec3 result; |
| 64 | |
| 65 | while(1) |
| 66 | { |
| 67 | result= RandPointInSphere( 1.0f ); |
| 68 | const float result_square_length= result.SquareLength(); |
| 69 | if( result_square_length == 0.0f ) |
| 70 | continue; |
| 71 | |
| 72 | result/= std::sqrt( result_square_length ); |
| 73 | break; |
| 74 | } |
| 75 | |
| 76 | return result; |
| 77 | } |
| 78 | |
| 79 | bool LongRand::RandBool() |
| 80 | { |