<commit_before>/* Copyright 1995-2014 Esri
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * For additional information, contact:
 * Environmental Systems Research Institute, Inc.
 * Attn: Contracts Dept
 * 380 New York Street
 * Redlands, California, USA 92373
 *
 * email: <EMAIL>
 *
 */

package com.esri.android.mapsapp.tools;

import com.esri.android.map.MapView;
import com.esri.android.mapsapp.R;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.view.View;

/**
 * The implementation of compass. There are two modes of operation for rotating
 * the compass, one is using device motion sensors and latter using the pinch
 * listeners.
 * 
 */
public class Compass extends View implements SensorEventListener {

	float mAngle = 0;
	Paint mPaint;
	Bitmap mBitmap;
	Matrix mMatrix;
	MapView mMapView;

	// Handles the senors
	public SensorManager sensorManager;

	// Sensors for accelerometer and magnetometer
	public Sensor gsensor;
	public Sensor msensor;

	// Used for orientation of the compass
	private float[] mGravity = new float[3];
	private float[] mGeomagnetic = new float[3];

	// The angle of rotation of the compass
	private float azimuth = 0f;<commit_msg>fixed typo<commit_after>/* Copyright 1995-2014 Esri
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * For additional information, contact:
 * Environmental Systems Research Institute, Inc.
 * Attn: Contracts Dept
 * 380 New York Street
 * Redlands, California, USA 92373
 *
 * email: <EMAIL>
 *
 */

package com.esri.android.mapsapp.tools;

import com.esri.android.map.MapView;
import com.esri.android.mapsapp.R;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.view.View;

/**
 * The implementation of compass. There are two modes of operation for rotating
 * the compass, one is using device motion sensors and latter using the pinch
 * listeners.
 * 
 */
public class Compass extends View implements SensorEventListener {

	float mAngle = 0;
	Paint mPaint;
	Bitmap mBitmap;
	Matrix mMatrix;
	MapView mMapView;

	// Handles the sensors
	public SensorManager sensorManager;

	// Sensors for accelerometer and magnetometer
	public Sensor gsensor;
	public Sensor msensor;

	// Used for orientation of the compass
	private float[] mGravity = new float[3];
	private float[] mGeomagnetic = new float[3];

	// The angle of rotation of the compass
	private float azimuth = 0f;
{'fraction_non_alphanumeric': 0.07757757757757758, 'fraction_numerical': 0.012012012012012012, 'mean_word_length': 4.401351351351352, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1689553', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1072, 'n_words': 440}